ICoreWebView2CookieManager
COMメソッド 8
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT CreateCookie(LPWSTR name, LPWSTR value, LPWSTR domain, LPWSTR path, ICoreWebView2Cookie** cookie)
| name | LPWSTR | in | 作成する Cookie の名前を指定する LPWSTR である。 |
| value | LPWSTR | in | 作成する Cookie の値を指定する LPWSTR である。 |
| domain | LPWSTR | in | 作成する Cookie のドメインを指定する LPWSTR である。 |
| path | LPWSTR | in | 作成する Cookie のパスを指定する LPWSTR である。 |
| cookie | ICoreWebView2Cookie** | out | 生成された ICoreWebView2Cookie オブジェクトを受け取るポインタへのポインタである。 |
vtbl 4 HRESULT CopyCookie(ICoreWebView2Cookie* cookieParam, ICoreWebView2Cookie** cookie)
| cookieParam | ICoreWebView2Cookie* | in | 複製元となる ICoreWebView2Cookie へのポインタである。 |
| cookie | ICoreWebView2Cookie** | out | 複製された ICoreWebView2Cookie オブジェクトを受け取るポインタへのポインタである。 |
vtbl 5 HRESULT GetCookies(LPWSTR uri, ICoreWebView2GetCookiesCompletedHandler* handler)
| uri | LPWSTR | in | 取得対象の Cookie を絞り込む URI を指定する LPWSTR である。NULL を渡すとすべての Cookie を取得する。 |
| handler | ICoreWebView2GetCookiesCompletedHandler* | in | 取得完了時に結果を受け取るための ICoreWebView2GetCookiesCompletedHandler へのポインタである。 |
vtbl 6 HRESULT AddOrUpdateCookie(ICoreWebView2Cookie* cookie)
| cookie | ICoreWebView2Cookie* | in | 追加または更新する Cookie を表す ICoreWebView2Cookie へのポインタである。 |
vtbl 7 HRESULT DeleteCookie(ICoreWebView2Cookie* cookie)
| cookie | ICoreWebView2Cookie* | in | 削除対象の Cookie を表す ICoreWebView2Cookie へのポインタである。 |
vtbl 8 HRESULT DeleteCookies(LPWSTR name, LPWSTR uri)
| name | LPWSTR | in | 削除する Cookie の名前を指定する LPWSTR である。 |
| uri | LPWSTR | in | 削除対象を絞り込む URI を指定する LPWSTR である。 |
vtbl 9 HRESULT DeleteCookiesWithDomainAndPath(LPWSTR name, LPWSTR domain, LPWSTR path)
| name | LPWSTR | in | 削除する Cookie の名前を指定する LPWSTR である。 |
| domain | LPWSTR | in | 削除対象を絞り込むドメインを指定する LPWSTR である。 |
| path | LPWSTR | in | 削除対象を絞り込むパスを指定する LPWSTR である。 |
vtbl 10 HRESULT DeleteAllCookies( void)
| void | in | 引数はない。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
#define global IID_ICoreWebView2CookieManager "{177CD9E7-B6F5-451A-94A0-5D7A3A4C4141}"
#usecom global ICoreWebView2CookieManager IID_ICoreWebView2CookieManager "{}"
#comfunc global ICoreWebView2CookieManager_CreateCookie 3 wstr,wstr,wstr,wstr,sptr
#comfunc global ICoreWebView2CookieManager_CopyCookie 4 sptr,sptr
#comfunc global ICoreWebView2CookieManager_GetCookies 5 wstr,sptr
#comfunc global ICoreWebView2CookieManager_AddOrUpdateCookie 6 sptr
#comfunc global ICoreWebView2CookieManager_DeleteCookie 7 sptr
#comfunc global ICoreWebView2CookieManager_DeleteCookies 8 wstr,wstr
#comfunc global ICoreWebView2CookieManager_DeleteCookiesWithDomainAndPath 9 wstr,wstr,wstr
#comfunc global ICoreWebView2CookieManager_DeleteAllCookies 10 int
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。