vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IXMLHTTPRequest "{ED8C108D-4349-11D2-91A4-00C04F7969E8}"
#usecom global IXMLHTTPRequest IID_IXMLHTTPRequest "{ED8C108E-4349-11D2-91A4-00C04F7969E8}"
#comfunc global IXMLHTTPRequest_open 7 wstr,wstr,int,int,int
#comfunc global IXMLHTTPRequest_setRequestHeader 8 wstr,wstr
#comfunc global IXMLHTTPRequest_getResponseHeader 9 wstr,var
#comfunc global IXMLHTTPRequest_getAllResponseHeaders 10 var
#comfunc global IXMLHTTPRequest_send 11 int
#comfunc global IXMLHTTPRequest_abort 12
#comfunc global IXMLHTTPRequest_get_status 13 var
#comfunc global IXMLHTTPRequest_get_statusText 14 var
#comfunc global IXMLHTTPRequest_get_responseXML 15 sptr
#comfunc global IXMLHTTPRequest_get_responseText 16 var
#comfunc global IXMLHTTPRequest_get_responseBody 17 var
#comfunc global IXMLHTTPRequest_get_responseStream 18 var
#comfunc global IXMLHTTPRequest_get_readyState 19 var
#comfunc global IXMLHTTPRequest_put_onreadystatechange 20 sptr
; ※数字は 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_IXMLHTTPRequest "{ED8C108D-4349-11D2-91A4-00C04F7969E8}"
#usecom global IXMLHTTPRequest IID_IXMLHTTPRequest "{ED8C108E-4349-11D2-91A4-00C04F7969E8}"
#comfunc global IXMLHTTPRequest_open 7 wstr,wstr,int,int,int
#comfunc global IXMLHTTPRequest_setRequestHeader 8 wstr,wstr
#comfunc global IXMLHTTPRequest_getResponseHeader 9 wstr,sptr
#comfunc global IXMLHTTPRequest_getAllResponseHeaders 10 sptr
#comfunc global IXMLHTTPRequest_send 11 int
#comfunc global IXMLHTTPRequest_abort 12
#comfunc global IXMLHTTPRequest_get_status 13 sptr
#comfunc global IXMLHTTPRequest_get_statusText 14 sptr
#comfunc global IXMLHTTPRequest_get_responseXML 15 sptr
#comfunc global IXMLHTTPRequest_get_responseText 16 sptr
#comfunc global IXMLHTTPRequest_get_responseBody 17 sptr
#comfunc global IXMLHTTPRequest_get_responseStream 18 sptr
#comfunc global IXMLHTTPRequest_get_readyState 19 sptr
#comfunc global IXMLHTTPRequest_put_onreadystatechange 20 sptr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。
; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。