System.Win.ComObj.TAutoObjectFactory.Create
Delphi
constructor Create(ComServer: TComServerObject; AutoClass: TAutoClass; const ClassID: TGUID; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);
C++
__fastcall TAutoObjectFactory(TComServerObject* ComServer, TAutoClass AutoClass, const GUID &ClassID, TClassInstancing Instancing, TThreadingModel ThreadingModel);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.Win.ComObj.pas System.Win.ComObj.hpp |
System.Win.ComObj | TAutoObjectFactory |
Description
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
- System.Win.ComObj.TAutoObjectFactory.DispIntfEntry
- System.Win.ComObj.TAutoObjectFactory.DispTypeInfo