HttpServerUtility.CreateObjectFromClsid(String) Method

Definition

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

C#
public object CreateObjectFromClsid(string clsid);

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.

C#
String ClsidStr;
Object MyObject;

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

Applies to

Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also