IActionCollection
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。
IID02820e19-7b98-4ed2-b2e8-fdccceff619b継承元IDispatch呼び出し名前(IDispatch) または vtbl自前メソッド開始 vtbl7
メソッド 10
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
| pCount | INT* | inout | コレクションに含まれるアクションの数を受け取る変数へのポインタである。 |
| index | INT | in | 取得するアクションの 1 始まりのインデックスを指定する。 |
| ppAction | IAction** | out | 指定したインデックスのアクション (IAction) を受け取る出力ポインタである。 |
| ppEnum | IUnknown** | out | コレクションを列挙する列挙子 (IEnumVARIANT) の IUnknown を受け取る出力ポインタである。 |
| pText | LPWSTR* | inout | コレクション内のアクションを表す XML テキストを受け取る出力ポインタである。SysFreeString で解放する。 |
| text | LPWSTR | in | コレクションに設定するアクションを表す XML テキストを指定する。 |
| type | TASK_ACTION_TYPE | in | 作成するアクションの種類を表す TASK_ACTION_TYPE 値を指定する。 |
| ppAction | IAction** | out | 作成されたアクション (IAction) を受け取る出力ポインタである。 |
| index | VARIANT | in | 削除するアクションを指定するインデックスを格納した VARIANT である。 |
| pContext | LPWSTR* | inout | アクションが実行される際の識別子コンテキストを受け取る出力ポインタである。SysFreeString で解放する。 |
| context | LPWSTR | in | アクションが実行される際の識別子コンテキストを指定する。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IActionCollection "{02820E19-7B98-4ED2-B2E8-FDCCCEFF619B}"
#usecom global IActionCollection IID_IActionCollection "{}"
#comfunc global IActionCollection_get_Count 7 var
#comfunc global IActionCollection_get_Item 8 int,sptr
#comfunc global IActionCollection_get__NewEnum 9 sptr
#comfunc global IActionCollection_get_XmlText 10 var
#comfunc global IActionCollection_put_XmlText 11 wstr
#comfunc global IActionCollection_Create 12 int,sptr
#comfunc global IActionCollection_Remove 13 int
#comfunc global IActionCollection_Clear 14
#comfunc global IActionCollection_get_Context 15 var
#comfunc global IActionCollection_put_Context 16 wstr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IActionCollection "{02820E19-7B98-4ED2-B2E8-FDCCCEFF619B}"
#usecom global IActionCollection IID_IActionCollection "{}"
#comfunc global IActionCollection_get_Count 7 sptr
#comfunc global IActionCollection_get_Item 8 int,sptr
#comfunc global IActionCollection_get__NewEnum 9 sptr
#comfunc global IActionCollection_get_XmlText 10 sptr
#comfunc global IActionCollection_put_XmlText 11 wstr
#comfunc global IActionCollection_Create 12 int,sptr
#comfunc global IActionCollection_Remove 13 int
#comfunc global IActionCollection_Clear 14
#comfunc global IActionCollection_get_Context 15 sptr
#comfunc global IActionCollection_put_Context 16 wstr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。