ScriptEngineAddCOMObject(String, String) Method |
Creates a COM/ActiveX object and exposes it to script code. The registered class is
specified by programmatic identifier (ProgID).
Namespace: Microsoft.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax public void AddCOMObject(
string itemName,
string progID
)
Public Sub AddCOMObject (
itemName As String,
progID As String
)
public:
virtual void AddCOMObject(
String^ itemName,
String^ progID
) sealed
abstract AddCOMObject :
itemName : string *
progID : string -> unit
override AddCOMObject :
itemName : string *
progID : string -> unit
Parameters
- itemName String
- A name for the new global script item that will represent the object.
- progID String
- The programmatic identifier (ProgID) of the registered class to instantiate.
Implements
IScriptEngineAddCOMObject(String, String)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