API:System.Win.VCLCom.TComponentFactory.Create

From RAD Studio API Documentation
Jump to: navigation, search

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);

Properties

Type Visibility Source Unit Parent
constructor public
System.Win.VCLCom.pas
System.Win.VCLCom.hpp
System.Win.VCLCom TComponentFactory

Description

Instantiates a TAutoObjectFactory object.

System.Win.VCLCom.TComponentFactory.Create inherits from System.Win.ComObj.TAutoObjectFactory.Create. All content below this line refers to System.Win.ComObj.TAutoObjectFactory.Create.

Instantiates a TAutoObjectFactory object.

Create allocates memory for a TAutoObjectFactory object and calls the inherited Create, passing it the same parameters. Then it initializes the DispIntfEntry and DispTypeInfo properties, raising an EOleError exception on error. The Create sets the ErrorIID property to point to DispIntfEntry.

Class factories should be instantiated in the initialization section of the unit that includes the code for the CoClass they instantiate. Factories are automatically available when the server is loaded.

See Also