System.Win.ComObj.TComObjectFactory.Create
Delphi
constructor Create(ComServer: TComServerObject; ComClass: TComClass;
const ClassID: TGUID; const ClassName, Description: string;
Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);
C++
__fastcall TComObjectFactory(TComServerObject* ComServer, TComClass ComClass, const GUID &ClassID, const System::UnicodeString ClassName, const System::UnicodeString Description, TClassInstancing Instancing, TThreadingModel ThreadingModel);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
constructor | public | System.Win.ComObj.pas System.Win.ComObj.hpp |
System.Win.ComObj | TComObjectFactory |
説明
クラスファクトリオブジェクトをインスタンス化します。
Create メソッドは通常,サーバーがロードされるときに,クラスファクトリをインスタンス化します。クラスファクトリをサーバーのロード時に自動的に使用可能にするように,クラスファクトリはその関連付けられたサーバーを含むユニットの initialization セクションでインスタンス化しなければなりません。
Create はクラスファクトリオブジェクトのメモリを割り当て,そのオブジェクトを ComClassManager の管理するクラスファクトリリストに追加します。次に,Create は渡された値を使って以下のプロパティを初期化します。
- ComServer を ComServer パラメータに設定する
- ComClass を ComClass パラメータに設定する
- ClassID を ClassID パラメータに設定する
- ClassName を ClassName パラメータに設定する
- Description を Description パラメータに設定する
- Instancing を Instancing パラメータに設定する
- ThreadingModel を ThreadingModel パラメータに設定する
- ErrorIID を IUnknown に設定する