ScriptEngineAddCOMType(String, HostItemFlags, String) Method |
Imports a COM/ActiveX type and exposes it to script code with the specified options.
The registered class is specified by programmatic identifier (ProgID).
Namespace: Microsoft.ClearScriptAssembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntaxpublic void AddCOMType(
string itemName,
HostItemFlags flags,
string progID
)
Public Sub AddCOMType (
itemName As String,
flags As HostItemFlags,
progID As String
)
public:
virtual void AddCOMType(
String^ itemName,
HostItemFlags flags,
String^ progID
) sealed
abstract AddCOMType :
itemName : string *
flags : HostItemFlags *
progID : string -> unit
override AddCOMType :
itemName : string *
flags : HostItemFlags *
progID : string -> unit
Parameters
- itemName String
- A name for the new global script item that will represent the type.
- flags HostItemFlags
- A value that selects options for the operation.
- progID String
- The programmatic identifier (ProgID) of the registered class to import.
Implements
IScriptEngineAddCOMType(String, HostItemFlags, 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