ICoreWebView2Profile
COMメソッド 7
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT get_ProfileName(LPWSTR* value)
| value | LPWSTR* | out | プロファイル名を受け取る出力先へのポインタである。 |
vtbl 4 HRESULT get_IsInPrivateModeEnabled(BOOL* value)
| value | BOOL* | out | InPrivate(プライベート)モードが有効かどうかを受け取る出力先へのポインタである。 |
vtbl 5 HRESULT get_ProfilePath(LPWSTR* value)
| value | LPWSTR* | out | プロファイルデータが格納されているディレクトリのパスを受け取る出力先へのポインタである。 |
vtbl 6 HRESULT get_DefaultDownloadFolderPath(LPWSTR* value)
| value | LPWSTR* | out | 既定のダウンロード先フォルダーのパスを受け取る出力先へのポインタである。 |
vtbl 7 HRESULT put_DefaultDownloadFolderPath(LPWSTR value)
| value | LPWSTR | in | 既定のダウンロード先フォルダーのパスを指定する。 |
vtbl 8 HRESULT get_PreferredColorScheme(COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value)
| value | COREWEBVIEW2_PREFERRED_COLOR_SCHEME* | out | Web コンテンツに適用する優先カラースキーム(自動/ライト/ダーク)を受け取る出力先へのポインタである。 |
vtbl 9 HRESULT put_PreferredColorScheme(COREWEBVIEW2_PREFERRED_COLOR_SCHEME value)
| value | COREWEBVIEW2_PREFERRED_COLOR_SCHEME | in | Web コンテンツに適用する優先カラースキーム(自動/ライト/ダーク)を指定する。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
出力引数:
#define global IID_ICoreWebView2Profile "{79110AD3-CD5D-4373-8BC3-C60658F17A5F}" #usecom global ICoreWebView2Profile IID_ICoreWebView2Profile "{}" #comfunc global ICoreWebView2Profile_get_ProfileName 3 var #comfunc global ICoreWebView2Profile_get_IsInPrivateModeEnabled 4 var #comfunc global ICoreWebView2Profile_get_ProfilePath 5 var #comfunc global ICoreWebView2Profile_get_DefaultDownloadFolderPath 6 var #comfunc global ICoreWebView2Profile_put_DefaultDownloadFolderPath 7 wstr #comfunc global ICoreWebView2Profile_get_PreferredColorScheme 8 var #comfunc global ICoreWebView2Profile_put_PreferredColorScheme 9 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_ICoreWebView2Profile "{79110AD3-CD5D-4373-8BC3-C60658F17A5F}" #usecom global ICoreWebView2Profile IID_ICoreWebView2Profile "{}" #comfunc global ICoreWebView2Profile_get_ProfileName 3 sptr #comfunc global ICoreWebView2Profile_get_IsInPrivateModeEnabled 4 sptr #comfunc global ICoreWebView2Profile_get_ProfilePath 5 sptr #comfunc global ICoreWebView2Profile_get_DefaultDownloadFolderPath 6 sptr #comfunc global ICoreWebView2Profile_put_DefaultDownloadFolderPath 7 wstr #comfunc global ICoreWebView2Profile_get_PreferredColorScheme 8 sptr #comfunc global ICoreWebView2Profile_put_PreferredColorScheme 9 int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。