vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IShellDispatch2 "{A4C6892C-3BA9-11D2-9DEA-00C04FB16162}"
#usecom global IShellDispatch2 IID_IShellDispatch2 "{}"
#comfunc global IShellDispatch2_IsRestricted 30 wstr,wstr,var
#comfunc global IShellDispatch2_ShellExecute 31 wstr,int,int,int,int
#comfunc global IShellDispatch2_FindPrinter 32 wstr,wstr,wstr
#comfunc global IShellDispatch2_GetSystemInformation 33 wstr,var
#comfunc global IShellDispatch2_ServiceStart 34 wstr,int,var
#comfunc global IShellDispatch2_ServiceStop 35 wstr,int,var
#comfunc global IShellDispatch2_IsServiceRunning 36 wstr,var
#comfunc global IShellDispatch2_CanStartStopService 37 wstr,var
#comfunc global IShellDispatch2_ShowBrowserBar 38 wstr,int,var
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IShellDispatch2 "{A4C6892C-3BA9-11D2-9DEA-00C04FB16162}"
#usecom global IShellDispatch2 IID_IShellDispatch2 "{}"
#comfunc global IShellDispatch2_IsRestricted 30 wstr,wstr,sptr
#comfunc global IShellDispatch2_ShellExecute 31 wstr,int,int,int,int
#comfunc global IShellDispatch2_FindPrinter 32 wstr,wstr,wstr
#comfunc global IShellDispatch2_GetSystemInformation 33 wstr,sptr
#comfunc global IShellDispatch2_ServiceStart 34 wstr,int,sptr
#comfunc global IShellDispatch2_ServiceStop 35 wstr,int,sptr
#comfunc global IShellDispatch2_IsServiceRunning 36 wstr,sptr
#comfunc global IShellDispatch2_CanStartStopService 37 wstr,sptr
#comfunc global IShellDispatch2_ShowBrowserBar 38 wstr,int,sptr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。