ホーム › Media.DirectShow.Tv › IComponent
IComponent
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 9
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT get_Type(IComponentType** CT)
| CT | IComponentType** | out | このコンポーネントの種別を表すIComponentTypeを返す出力ポインタ。 |
vtbl 8 HRESULT put_Type(IComponentType* CT)
| CT | IComponentType* | in | 設定するコンポーネント種別IComponentTypeへのポインタ。 |
| LangID | INT* | out | コンポーネント説明文の言語識別子(LANGID)を返すINTの受け取りポインタ。 |
| LangID | INT | in | 設定する説明文の言語識別子(LANGID)。 |
vtbl 11 HRESULT get_Status(ComponentStatus* Status)
| Status | ComponentStatus* | out | コンポーネントの状態(ComponentStatus列挙、アクティブ/非アクティブ等)を返す受け取りポインタ。 |
vtbl 12 HRESULT put_Status(ComponentStatus Status)
| Status | ComponentStatus | in | 設定するコンポーネント状態(ComponentStatus列挙)。 |
| Description | LPWSTR* | out | コンポーネントの説明文字列(BSTR)を返すLPWSTRの受け取りポインタ。 |
| Description | LPWSTR | in | 設定するコンポーネント説明文字列(BSTR)。 |
vtbl 15 HRESULT Clone(IComponent** NewComponent)
| NewComponent | IComponent** | out | 現在のコンポーネントの複製IComponentを返す出力ポインタ。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IComponent "{1A5576FC-0E19-11D3-9D8E-00C04F72D980}" #usecom global IComponent IID_IComponent "{59DC47A8-116C-11D3-9D8E-00C04F72D980}" #comfunc global IComponent_get_Type 7 sptr #comfunc global IComponent_put_Type 8 sptr #comfunc global IComponent_get_DescLangID 9 var #comfunc global IComponent_put_DescLangID 10 int #comfunc global IComponent_get_Status 11 var #comfunc global IComponent_put_Status 12 int #comfunc global IComponent_get_Description 13 var #comfunc global IComponent_put_Description 14 wstr #comfunc global IComponent_Clone 15 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IComponent "{1A5576FC-0E19-11D3-9D8E-00C04F72D980}" #usecom global IComponent IID_IComponent "{59DC47A8-116C-11D3-9D8E-00C04F72D980}" #comfunc global IComponent_get_Type 7 sptr #comfunc global IComponent_put_Type 8 sptr #comfunc global IComponent_get_DescLangID 9 sptr #comfunc global IComponent_put_DescLangID 10 int #comfunc global IComponent_get_Status 11 sptr #comfunc global IComponent_put_Status 12 int #comfunc global IComponent_get_Description 13 sptr #comfunc global IComponent_put_Description 14 wstr #comfunc global IComponent_Clone 15 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。