HttpServerUtility.CreateObject Methode

Definition

Erstellt eine Serverinstanz eines COM-Objekts.

Überlädt

Name Beschreibung
CreateObject(String)

Erstellt eine Serverinstanz eines COM-Objekts, das durch den programmgesteuerten Bezeichner (ProgID) des Objekts identifiziert wird.

CreateObject(Type)

Erstellt eine Serverinstanz eines COM-Objekts, das vom Typ des Objekts identifiziert wird.

CreateObject(String)

Erstellt eine Serverinstanz eines COM-Objekts, das durch den programmgesteuerten Bezeichner (ProgID) des Objekts identifiziert wird.

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

Parameter

progID
String

Die Klasse oder der Typ des Objekts, von der eine Instanz erstellt werden soll.

Gibt zurück

Das neue Objekt.

Ausnahmen

Eine Instanz des Objekts konnte nicht erstellt werden.

Beispiele

Im folgenden Beispiel wird ein Objekt mithilfe der ProgID des Objekts erstellt.

Object MyObject;
MyObject = Server.CreateObject("Acme.Component.3");

Dim MyObject As Object
MyObject = Server.CreateObject("Acme.Component.3")
   

Weitere Informationen

Gilt für:

CreateObject(Type)

Erstellt eine Serverinstanz eines COM-Objekts, das vom Typ des Objekts identifiziert wird.

public:
 System::Object ^ CreateObject(Type ^ type);
public object CreateObject(Type type);
member this.CreateObject : Type -> obj
Public Function CreateObject (type As Type) As Object

Parameter

type
Type

A Type representing the object to create.

Gibt zurück

Das neue Objekt.

Gilt für: