ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
IScriptEngine Interface
IScriptEngine Methods
AddCOMObject Method
AddCOMObject(String, Guid) Method
AddCOMObject(String, String) Method
AddCOMObject(String, HostItemFlags, Guid) Method
AddCOMObject(String, HostItemFlags, String) Method
AddCOMObject(String, Guid, String) Method
AddCOMObject(String, String, String) Method
AddCOMObject(String, HostItemFlags, Guid, String) Method
AddCOMObject(String, HostItemFlags, String, String) Method

# IScriptEngineAddCOMObject(String, Guid) Method

Creates a COM/ActiveX object and exposes it to script code. 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

    void AddCOMObject(
    	string itemName,
    	Guid clsid
    )

    Sub AddCOMObject (
    	itemName As String,
    	clsid As Guid
    )

    void AddCOMObject(
    	String^ itemName,
    	Guid clsid
    )

    abstract AddCOMObject :
            itemName : string *
            clsid : Guid -> unit

#### Parameters

itemName String
  A name for the new global script item that will represent the object.
clsid Guid
  The class identifier (CLSID) of the registered class to instantiate.

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

#### Reference

IScriptEngine Interface
AddCOMObject Overload
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft