ホーム › Web.MsHtml › IHTMLDocument6
IHTMLDocument6
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 8
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
vtbl 7 HRESULT get_compatible(IHTMLDocumentCompatibleInfoCollection** p)
| p | IHTMLDocumentCompatibleInfoCollection** | out | ドキュメントの互換性情報のコレクションを表す IHTMLDocumentCompatibleInfoCollection を受け取るポインタである。 |
| p | VARIANT* | out | ドキュメントのレンダリングモードを表す値を受け取る VARIANT へのポインタである。 |
| v | VARIANT | in | onstorage イベント発生時に呼び出すイベントハンドラを設定する VARIANT である。 |
| p | VARIANT* | out | 現在設定されている onstorage イベントハンドラを受け取る VARIANT へのポインタである。 |
| v | VARIANT | in | onstoragecommit イベント発生時に呼び出すイベントハンドラを設定する VARIANT である。 |
| p | VARIANT* | out | 現在設定されている onstoragecommit イベントハンドラを受け取る VARIANT へのポインタである。 |
vtbl 13 HRESULT getElementById(LPWSTR bstrId, IHTMLElement2** ppRetElement)
| bstrId | LPWSTR | in | 取得する要素の id 属性値を指定する。 |
| ppRetElement | IHTMLElement2** | out | 指定した id に一致する要素を表す IHTMLElement2 を受け取るポインタである。見つからない場合は NULL となる。 |
vtbl 14 HRESULT updateSettings()
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IHTMLDocument6 "{30510417-98B5-11CF-BB82-00AA00BDCE0B}" #usecom global IHTMLDocument6 IID_IHTMLDocument6 "{25336920-03F9-11CF-8FD0-00AA00686F13}" #comfunc global IHTMLDocument6_get_compatible 7 sptr #comfunc global IHTMLDocument6_get_documentMode 8 var #comfunc global IHTMLDocument6_put_onstorage 9 int #comfunc global IHTMLDocument6_get_onstorage 10 var #comfunc global IHTMLDocument6_put_onstoragecommit 11 int #comfunc global IHTMLDocument6_get_onstoragecommit 12 var #comfunc global IHTMLDocument6_getElementById 13 wstr,sptr #comfunc global IHTMLDocument6_updateSettings 14 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IHTMLDocument6 "{30510417-98B5-11CF-BB82-00AA00BDCE0B}" #usecom global IHTMLDocument6 IID_IHTMLDocument6 "{25336920-03F9-11CF-8FD0-00AA00686F13}" #comfunc global IHTMLDocument6_get_compatible 7 sptr #comfunc global IHTMLDocument6_get_documentMode 8 sptr #comfunc global IHTMLDocument6_put_onstorage 9 int #comfunc global IHTMLDocument6_get_onstorage 10 sptr #comfunc global IHTMLDocument6_put_onstoragecommit 11 int #comfunc global IHTMLDocument6_get_onstoragecommit 12 sptr #comfunc global IHTMLDocument6_getElementById 13 wstr,sptr #comfunc global IHTMLDocument6_updateSettings 14 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。