Home > Web Front-end > JS Tutorial > Steps to write COM components in JavaScript_javascript tips

Steps to write COM components in JavaScript_javascript tips

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:55:24
Original
1619 people have browsed it

Scripting languages ​​that support these interfaces include: JavaScript/JScript, VBScript, Perl and Python, etc.
WSC has the following characteristics.
Ø Small and efficient;
Ø Easy to create, maintain and deploy;
Ø Provides the ability to create COM components;
Ø Provides the ability to access a large number of system services.
The core work of writing COM components in JavaScript is to complete a .wsc (Windows Scripting Component) file. The .wsc file is a standard XML file with the following format:



description="Description"
progid ="Program ID"
version="Version number"
classid="Type ID" remotable="true">










Describes the previously defined method or attribute name
]]>






The entire .wsc file consists of component declaration, method and attribute declaration, method and attribute description, method implementation, etc. The process of writing COM components using scripting languages ​​such as VBScript or JavaScript is the process of completing the .wsc file. Note: The execution performance of COM components written using scripting languages ​​such as VBScript or JavaScript cannot be compared with COM using executable binary files such as .dll and .ocx as carriers. Because scripting languages ​​cannot be compiled, but can only run on the host. The scripting host on the Windows platform is WSH (Windows Scripting Host), which is WINDOWSsystem32scrobj.dll. Calling a COM component written in a scripting language is actually a process of directly calling WSH and then having WSH execute the script program.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template