ScriptEngineAddCOMObject Method (String, String, String) |
Creates a COM/ActiveX object on the specified server and exposes it to script code. The
registered class is specified by programmatic identifier (ProgID).
Namespace:
Microsoft.ClearScript
Assembly:
ClearScript.Core (in ClearScript.Core.dll) Version: 7.2.5
Syntaxpublic void AddCOMObject(
string itemName,
string progID,
string serverName
)
Public Sub AddCOMObject (
itemName As String,
progID As String,
serverName As String
)
public:
void AddCOMObject(
String^ itemName,
String^ progID,
String^ serverName
)
member AddCOMObject :
itemName : string *
progID : string *
serverName : string -> unit
Parameters
- itemName
- Type: SystemString
A name for the new global script item that will represent the object. - progID
- Type: SystemString
The programmatic identifier (ProgID) of the registered class to instantiate. - serverName
- Type: SystemString
The name of the server on which to create the object.
Remarks
The progID argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
For information about the mapping between host members and script-callable properties
and methods, see AddHostObject(String, HostItemFlags, Object).
See Also