ICoreWebView2NotificationReceivedEventArgs
COMメソッド 5
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT get_SenderOrigin(LPWSTR* value)
| value | LPWSTR* | out | 通知を送信したページのオリジンを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 4 HRESULT get_Notification(ICoreWebView2Notification** value)
| value | ICoreWebView2Notification** | out | 受信した通知の内容を保持するオブジェクト (ICoreWebView2Notification) を受け取る。 |
vtbl 5 HRESULT put_Handled(BOOL value)
| value | BOOL | in | 通知をアプリ側で処理済みとしてマークするかどうかを指定する。TRUE の場合は既定の通知表示が抑止される。 |
vtbl 6 HRESULT get_Handled(BOOL* value)
| value | BOOL* | out | 通知がアプリ側で処理済みとしてマークされているかどうかを受け取る。 |
vtbl 7 HRESULT GetDeferral(ICoreWebView2Deferral** deferral)
| deferral | ICoreWebView2Deferral** | out | イベント処理を非同期に遅延させるための Deferral オブジェクト (ICoreWebView2Deferral) を受け取る。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
出力引数:
#define global IID_ICoreWebView2NotificationReceivedEventArgs "{1512DD5B-5514-4F85-886E-21C3A4C9CFE6}" #usecom global ICoreWebView2NotificationReceivedEventArgs IID_ICoreWebView2NotificationReceivedEventArgs "{}" #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_SenderOrigin 3 var #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Notification 4 sptr #comfunc global ICoreWebView2NotificationReceivedEventArgs_put_Handled 5 int #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Handled 6 var #comfunc global ICoreWebView2NotificationReceivedEventArgs_GetDeferral 7 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ICoreWebView2NotificationReceivedEventArgs "{1512DD5B-5514-4F85-886E-21C3A4C9CFE6}" #usecom global ICoreWebView2NotificationReceivedEventArgs IID_ICoreWebView2NotificationReceivedEventArgs "{}" #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_SenderOrigin 3 sptr #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Notification 4 sptr #comfunc global ICoreWebView2NotificationReceivedEventArgs_put_Handled 5 int #comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Handled 6 sptr #comfunc global ICoreWebView2NotificationReceivedEventArgs_GetDeferral 7 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。