ICoreWebView2ContextMenuItemCollection
COMメソッド 4
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT get_Count(DWORD* value)
| value | DWORD* | out | コレクションに含まれるメニュー項目の個数を受け取る DWORD へのポインタである。 |
vtbl 4 HRESULT GetValueAtIndex(DWORD index, ICoreWebView2ContextMenuItem** value)
| index | DWORD | in | 取得するメニュー項目の 0 始まりのインデックスを指定する。 |
| value | ICoreWebView2ContextMenuItem** | out | 指定インデックスの ICoreWebView2ContextMenuItem を受け取るポインタである。 |
vtbl 5 HRESULT RemoveValueAtIndex(DWORD index)
| index | DWORD | in | 削除するメニュー項目の 0 始まりのインデックスを指定する。 |
vtbl 6 HRESULT InsertValueAtIndex(DWORD index, ICoreWebView2ContextMenuItem* value)
| index | DWORD | in | メニュー項目を挿入する 0 始まりの位置を指定する。 |
| value | ICoreWebView2ContextMenuItem* | in | 挿入する ICoreWebView2ContextMenuItem へのポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
出力引数:
#define global IID_ICoreWebView2ContextMenuItemCollection "{F562A2F5-C415-45CF-B909-D4B7C1E276D3}" #usecom global ICoreWebView2ContextMenuItemCollection IID_ICoreWebView2ContextMenuItemCollection "{}" #comfunc global ICoreWebView2ContextMenuItemCollection_get_Count 3 var #comfunc global ICoreWebView2ContextMenuItemCollection_GetValueAtIndex 4 int,sptr #comfunc global ICoreWebView2ContextMenuItemCollection_RemoveValueAtIndex 5 int #comfunc global ICoreWebView2ContextMenuItemCollection_InsertValueAtIndex 6 int,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ICoreWebView2ContextMenuItemCollection "{F562A2F5-C415-45CF-B909-D4B7C1E276D3}" #usecom global ICoreWebView2ContextMenuItemCollection IID_ICoreWebView2ContextMenuItemCollection "{}" #comfunc global ICoreWebView2ContextMenuItemCollection_get_Count 3 sptr #comfunc global ICoreWebView2ContextMenuItemCollection_GetValueAtIndex 4 int,sptr #comfunc global ICoreWebView2ContextMenuItemCollection_RemoveValueAtIndex 5 int #comfunc global ICoreWebView2ContextMenuItemCollection_InsertValueAtIndex 6 int,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。