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, String, String) Method

Imports a COM/ActiveX type from 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.5.0
Syntax
C#
VB
C++
F#
Copy

    public void AddCOMType(
    	string itemName,
    	string progID,
    	string serverName
    )

    Public Sub AddCOMType (
    	itemName As String,
    	progID As String,
    	serverName As String
    )

    public:
    virtual void AddCOMType(
    	String^ itemName,
    	String^ progID,
    	String^ serverName
    ) sealed

    abstract AddCOMType :
            itemName : string *
            progID : string *
            serverName : string -> unit
    override AddCOMType :
            itemName : string *
            progID : string *
            serverName : string -> unit

#### Parameters

itemName String
  A name for the new global script item that will represent the type.
progID String
  The programmatic identifier (ProgID) of the registered class to import.
serverName String
  The name of the server from which to import the type.

#### Implements

IScriptEngineAddCOMType(String, 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

#### Reference

ScriptEngine Class
AddCOMType Overload
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft