vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IStringCollection "{EFF90582-2DDC-480F-A06D-60F3FBC362C3}"
#usecom global IStringCollection IID_IStringCollection "{72C97D74-7C3B-40AE-B77D-ABDB22EBA6FB}"
#comfunc global IStringCollection_get_Item 7 int,var
#comfunc global IStringCollection_put_Item 8 int,wstr
#comfunc global IStringCollection_get__NewEnum 9 sptr
#comfunc global IStringCollection_get_Count 10 var
#comfunc global IStringCollection_get_ReadOnly 11 var
#comfunc global IStringCollection_Add 12 wstr,var
#comfunc global IStringCollection_Clear 13
#comfunc global IStringCollection_Copy 14 sptr
#comfunc global IStringCollection_Insert 15 int,wstr
#comfunc global IStringCollection_RemoveAt 16 int
; ※数字は 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_IStringCollection "{EFF90582-2DDC-480F-A06D-60F3FBC362C3}"
#usecom global IStringCollection IID_IStringCollection "{72C97D74-7C3B-40AE-B77D-ABDB22EBA6FB}"
#comfunc global IStringCollection_get_Item 7 int,sptr
#comfunc global IStringCollection_put_Item 8 int,wstr
#comfunc global IStringCollection_get__NewEnum 9 sptr
#comfunc global IStringCollection_get_Count 10 sptr
#comfunc global IStringCollection_get_ReadOnly 11 sptr
#comfunc global IStringCollection_Add 12 wstr,sptr
#comfunc global IStringCollection_Clear 13
#comfunc global IStringCollection_Copy 14 sptr
#comfunc global IStringCollection_Insert 15 int,wstr
#comfunc global IStringCollection_RemoveAt 16 int
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※#usecom 末尾は CoCreateInstance 用のクラスID(コクラスCLSID, SDKから自動取得)。
; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。