Edytuj

Udostępnij za pośrednictwem


HttpServerUtility.CreateObjectFromClsid(String) Method

Definition

Creates a server instance of a COM object identified by the object's class identifier (CLSID).

public:
 System::Object ^ CreateObjectFromClsid(System::String ^ clsid);
public object CreateObjectFromClsid (string clsid);
member this.CreateObjectFromClsid : string -> obj
Public Function CreateObjectFromClsid (clsid As String) As Object

Parameters

clsid
String

The class identifier of the object to create an instance of.

Returns

The new object.

Exceptions

An instance of the object could not be created.

Examples

The following example demonstrates how to use the CreateObjectFromClsid method to create a server instance of a COM object.

String ClsidStr;
Object MyObject;

ClsidStr = "42754580-16b7-11ce-80eb-00aa003d7352";
MyObject = Server.CreateObject(ClsidStr);

Dim ClsidStr As String
Dim MyObject As Object
 
ClsidStr = "42754580-16b7-11ce-80eb-00aa003d7352"
MyObject = Server.CreateObject(ClsidStr)
   

Applies to

See also