ホーム › System.TransactionServer › IComponentUtil
IComponentUtil
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 4
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT InstallComponent(LPWSTR bstrDLLFile, LPWSTR bstrTypelibFile, LPWSTR bstrProxyStubDLLFile)
| bstrDLLFile | LPWSTR | in | インストールするコンポーネントの DLL ファイルのパスを指定する。 |
| bstrTypelibFile | LPWSTR | in | コンポーネントのタイプライブラリファイルのパスを指定する。 |
| bstrProxyStubDLLFile | LPWSTR | in | コンポーネントのプロキシ/スタブ DLL ファイルのパスを指定する。 |
| bstrCLSID | LPWSTR | in | インポートする既登録コンポーネントの CLSID を文字列で指定する。 |
| bstrProgID | LPWSTR | in | インポートする既登録コンポーネントの ProgID を指定する。 |
| bstrDLLFile | LPWSTR | in | CLSID を取得する対象コンポーネントの DLL ファイルのパスを指定する。 |
| bstrTypelibFile | LPWSTR | in | 対象コンポーネントのタイプライブラリファイルのパスを指定する。 |
| aCLSIDs | SAFEARRAY** | inout | DLL に含まれる CLSID の一覧を格納した SAFEARRAY を受け取るポインタへのポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IComponentUtil "{6EB22873-8A19-11D0-81B6-00A0C9231C29}" #usecom global IComponentUtil IID_IComponentUtil "{6EB22884-8A19-11D0-81B6-00A0C9231C29}" #comfunc global IComponentUtil_InstallComponent 7 wstr,wstr,wstr #comfunc global IComponentUtil_ImportComponent 8 wstr #comfunc global IComponentUtil_ImportComponentByName 9 wstr #comfunc global IComponentUtil_GetCLSIDs 10 wstr,wstr,var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IComponentUtil "{6EB22873-8A19-11D0-81B6-00A0C9231C29}" #usecom global IComponentUtil IID_IComponentUtil "{6EB22884-8A19-11D0-81B6-00A0C9231C29}" #comfunc global IComponentUtil_InstallComponent 7 wstr,wstr,wstr #comfunc global IComponentUtil_ImportComponent 8 wstr #comfunc global IComponentUtil_ImportComponentByName 9 wstr #comfunc global IComponentUtil_GetCLSIDs 10 wstr,wstr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。