API:System.Win.VCLCom.TComponentFactory.Create

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

constructor Create(ComServer: TComServerObject;  ComponentClass: TComponentClass; const ClassID: TGUID; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);

C++

__fastcall TComponentFactory(System::Win::Comobj::TComServerObject* ComServer, System::Classes::TComponentClass ComponentClass, const GUID &ClassID, System::Win::Comobj::TClassInstancing Instancing, System::Win::Comobj::TThreadingModel ThreadingModel);

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
constructor public
System.Win.VCLCom.pas
System.Win.VCLCom.hpp
System.Win.VCLCom TComponentFactory

Beschreibung

Instantiiert ein TAutoObjectFactory-Objekt.

System.Win.VCLCom.TComponentFactory.Create erbt von System.Win.ComObj.TAutoObjectFactory.Create. Der folgende Inhalt bezieht sich auf System.Win.ComObj.TAutoObjectFactory.Create.

Instantiiert ein TAutoObjectFactory-Objekt.

Create reserviert Speicher für das TAutoObjectFactory-Objekt und ruft die geerbte Methode Create mit denselben Parameter auf. Danach werden die Eigenschaften DispIntfEntry und DispTypeInfo initialisiert (bei einem Fehler wird eine EOleError-Exception ausgelöst). Create setzt auch die Eigenschaft ErrorIID die auf DispIntfEntry zeigt.

Klassengeneratoren sollten im Initialisierungsteil der Unit instantiiert werden, die den Code für die Co-Klasse enthält. Sie sind automatisch verfügbar, sobald der Server geladen wird.

Siehe auch