ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
ScriptEngine Class
ScriptEngine Methods
AddCOMType Method
AddCOMType(String, Guid) Method
AddCOMType(String, String) Method
AddCOMType(String, HostItemFlags, Guid) Method
AddCOMType(String, HostItemFlags, String) Method
AddCOMType(String, Guid, String) Method
AddCOMType(String, String, String) Method
AddCOMType(String, HostItemFlags, Guid, String) Method
AddCOMType(String, HostItemFlags, String, String) Method

# ScriptEngineAddCOMType(String, HostItemFlags, Guid) Method

Imports a COM/ActiveX type and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public void AddCOMType(
    	string itemName,
    	HostItemFlags flags,
    	Guid clsid
    )

    Public Sub AddCOMType (
    	itemName As String,
    	flags As HostItemFlags,
    	clsid As Guid
    )

    public:
    virtual void AddCOMType(
    	String^ itemName,
    	HostItemFlags flags,
    	Guid clsid
    ) sealed

    abstract AddCOMType :
            itemName : string *
            flags : HostItemFlags *
            clsid : Guid -> unit
    override AddCOMType :
            itemName : string *
            flags : HostItemFlags *
            clsid : Guid -> 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.
clsid Guid
  The class identifier (CLSID) of the registered class to import.

#### Implements

IScriptEngineAddCOMType(String, HostItemFlags, Guid)
Remarks
For information about the mapping between host members and script-callable properties and methods, see AddHostObject(String, HostItemFlags, Object).
See Also

#### Reference

ScriptEngine Class
AddCOMType Overload
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft