ICoreWebView2DownloadOperation
COMメソッド 19
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT add_BytesReceivedChanged(ICoreWebView2BytesReceivedChangedEventHandler* eventHandler, EventRegistrationToken* token)
| eventHandler | ICoreWebView2BytesReceivedChangedEventHandler* | in | 受信済みバイト数が変化したときに呼び出されるイベントハンドラへのポインタである。 |
| token | EventRegistrationToken* | out | 登録したハンドラを後で解除するための EventRegistrationToken を受け取るポインタである。 |
vtbl 4 HRESULT remove_BytesReceivedChanged(EventRegistrationToken token)
| token | EventRegistrationToken | in | add 時に取得した、解除対象のイベント登録を識別する EventRegistrationToken を指定する。 |
vtbl 5 HRESULT add_EstimatedEndTimeChanged(ICoreWebView2EstimatedEndTimeChangedEventHandler* eventHandler, EventRegistrationToken* token)
| eventHandler | ICoreWebView2EstimatedEndTimeChangedEventHandler* | in | 推定完了時刻が変化したときに呼び出されるイベントハンドラへのポインタである。 |
| token | EventRegistrationToken* | out | 登録したハンドラを後で解除するための EventRegistrationToken を受け取るポインタである。 |
vtbl 6 HRESULT remove_EstimatedEndTimeChanged(EventRegistrationToken token)
| token | EventRegistrationToken | in | add 時に取得した、解除対象のイベント登録を識別する EventRegistrationToken を指定する。 |
vtbl 7 HRESULT add_StateChanged(ICoreWebView2StateChangedEventHandler* eventHandler, EventRegistrationToken* token)
| eventHandler | ICoreWebView2StateChangedEventHandler* | in | ダウンロードの状態が変化したときに呼び出されるイベントハンドラへのポインタである。 |
| token | EventRegistrationToken* | out | 登録したハンドラを後で解除するための EventRegistrationToken を受け取るポインタである。 |
vtbl 8 HRESULT remove_StateChanged(EventRegistrationToken token)
| token | EventRegistrationToken | in | add 時に取得した、解除対象のイベント登録を識別する EventRegistrationToken を指定する。 |
vtbl 9 HRESULT get_Uri(LPWSTR* uri)
| uri | LPWSTR* | out | ダウンロード元の URI を受け取る LPWSTR へのポインタである。呼び出し側が CoTaskMemFree で解放する。 |
vtbl 10 HRESULT get_ContentDisposition(LPWSTR* contentDisposition)
| contentDisposition | LPWSTR* | out | 応答の Content-Disposition ヘッダの値を受け取る LPWSTR へのポインタである。呼び出し側が CoTaskMemFree で解放する。 |
vtbl 11 HRESULT get_MimeType(LPWSTR* mimeType)
| mimeType | LPWSTR* | out | ダウンロードされるコンテンツの MIME タイプを受け取る LPWSTR へのポインタである。呼び出し側が CoTaskMemFree で解放する。 |
vtbl 12 HRESULT get_TotalBytesToReceive(LONGLONG* totalBytesToReceive)
| totalBytesToReceive | LONGLONG* | out | ダウンロード対象の総バイト数を受け取る LONGLONG へのポインタである。不明な場合は -1 となる。 |
vtbl 13 HRESULT get_BytesReceived(LONGLONG* bytesReceived)
| bytesReceived | LONGLONG* | out | これまでに受信したバイト数を受け取る LONGLONG へのポインタである。 |
vtbl 14 HRESULT get_EstimatedEndTime(LPWSTR* estimatedEndTime)
| estimatedEndTime | LPWSTR* | out | ダウンロード完了の推定時刻を ISO 8601 形式の文字列として受け取る LPWSTR へのポインタである。呼び出し側が CoTaskMemFree で解放する。 |
vtbl 15 HRESULT get_ResultFilePath(LPWSTR* resultFilePath)
| resultFilePath | LPWSTR* | out | ダウンロード先の絶対ファイルパスを受け取る LPWSTR へのポインタである。呼び出し側が CoTaskMemFree で解放する。 |
vtbl 16 HRESULT get_State(COREWEBVIEW2_DOWNLOAD_STATE* downloadState)
| downloadState | COREWEBVIEW2_DOWNLOAD_STATE* | out | ダウンロードの現在の状態を受け取る COREWEBVIEW2_DOWNLOAD_STATE へのポインタである。 |
vtbl 17 HRESULT get_InterruptReason(COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON* interruptReason)
| interruptReason | COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON* | out | ダウンロードが中断された理由を受け取る COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON へのポインタである。 |
vtbl 18 HRESULT Cancel( void)
| void | in | 引数はない。 |
vtbl 19 HRESULT Pause( void)
| void | in | 引数はない。 |
vtbl 20 HRESULT Resume( void)
| void | in | 引数はない。 |
vtbl 21 HRESULT get_CanResume(BOOL* canResume)
| canResume | BOOL* | out | 中断されたダウンロードを再開可能か否かを受け取る BOOL へのポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
出力引数:
#define global IID_ICoreWebView2DownloadOperation "{3D6B6CF2-AFE1-44C7-A995-C65117714336}" #usecom global ICoreWebView2DownloadOperation IID_ICoreWebView2DownloadOperation "{}" #comfunc global ICoreWebView2DownloadOperation_add_BytesReceivedChanged 3 sptr,var #comfunc global ICoreWebView2DownloadOperation_remove_BytesReceivedChanged 4 int #comfunc global ICoreWebView2DownloadOperation_add_EstimatedEndTimeChanged 5 sptr,var #comfunc global ICoreWebView2DownloadOperation_remove_EstimatedEndTimeChanged 6 int #comfunc global ICoreWebView2DownloadOperation_add_StateChanged 7 sptr,var #comfunc global ICoreWebView2DownloadOperation_remove_StateChanged 8 int #comfunc global ICoreWebView2DownloadOperation_get_Uri 9 var #comfunc global ICoreWebView2DownloadOperation_get_ContentDisposition 10 var #comfunc global ICoreWebView2DownloadOperation_get_MimeType 11 var #comfunc global ICoreWebView2DownloadOperation_get_TotalBytesToReceive 12 var #comfunc global ICoreWebView2DownloadOperation_get_BytesReceived 13 var #comfunc global ICoreWebView2DownloadOperation_get_EstimatedEndTime 14 var #comfunc global ICoreWebView2DownloadOperation_get_ResultFilePath 15 var #comfunc global ICoreWebView2DownloadOperation_get_State 16 var #comfunc global ICoreWebView2DownloadOperation_get_InterruptReason 17 var #comfunc global ICoreWebView2DownloadOperation_Cancel 18 int #comfunc global ICoreWebView2DownloadOperation_Pause 19 int #comfunc global ICoreWebView2DownloadOperation_Resume 20 int #comfunc global ICoreWebView2DownloadOperation_get_CanResume 21 var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ICoreWebView2DownloadOperation "{3D6B6CF2-AFE1-44C7-A995-C65117714336}" #usecom global ICoreWebView2DownloadOperation IID_ICoreWebView2DownloadOperation "{}" #comfunc global ICoreWebView2DownloadOperation_add_BytesReceivedChanged 3 sptr,sptr #comfunc global ICoreWebView2DownloadOperation_remove_BytesReceivedChanged 4 int #comfunc global ICoreWebView2DownloadOperation_add_EstimatedEndTimeChanged 5 sptr,sptr #comfunc global ICoreWebView2DownloadOperation_remove_EstimatedEndTimeChanged 6 int #comfunc global ICoreWebView2DownloadOperation_add_StateChanged 7 sptr,sptr #comfunc global ICoreWebView2DownloadOperation_remove_StateChanged 8 int #comfunc global ICoreWebView2DownloadOperation_get_Uri 9 sptr #comfunc global ICoreWebView2DownloadOperation_get_ContentDisposition 10 sptr #comfunc global ICoreWebView2DownloadOperation_get_MimeType 11 sptr #comfunc global ICoreWebView2DownloadOperation_get_TotalBytesToReceive 12 sptr #comfunc global ICoreWebView2DownloadOperation_get_BytesReceived 13 sptr #comfunc global ICoreWebView2DownloadOperation_get_EstimatedEndTime 14 sptr #comfunc global ICoreWebView2DownloadOperation_get_ResultFilePath 15 sptr #comfunc global ICoreWebView2DownloadOperation_get_State 16 sptr #comfunc global ICoreWebView2DownloadOperation_get_InterruptReason 17 sptr #comfunc global ICoreWebView2DownloadOperation_Cancel 18 int #comfunc global ICoreWebView2DownloadOperation_Pause 19 int #comfunc global ICoreWebView2DownloadOperation_Resume 20 int #comfunc global ICoreWebView2DownloadOperation_get_CanResume 21 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。