ホーム › Devices.DeviceAccess › ICreateDeviceAccessAsync
ICreateDeviceAccessAsync
COMメソッド 4
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT Cancel()
| timeout | DWORD | in | デバイスアクセス生成完了を待機する最大時間(ミリ秒)。INFINITEで無期限待機する。 |
vtbl 5 HRESULT Close()
vtbl 6 HRESULT GetResult(GUID* riid, void** deviceAccess)
| riid | GUID* | in | 取得したいデバイスアクセスインターフェイスのGUID(IID)。 |
| deviceAccess | void** | out | 要求したインターフェイスへのポインタを受け取る出力先。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ICreateDeviceAccessAsync "{3474628F-683D-42D2-ABCB-DB018C6503BC}" #usecom global ICreateDeviceAccessAsync IID_ICreateDeviceAccessAsync "{}" #comfunc global ICreateDeviceAccessAsync_Cancel 3 #comfunc global ICreateDeviceAccessAsync_Wait 4 int #comfunc global ICreateDeviceAccessAsync_Close 5 #comfunc global ICreateDeviceAccessAsync_GetResult 6 var,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ICreateDeviceAccessAsync "{3474628F-683D-42D2-ABCB-DB018C6503BC}" #usecom global ICreateDeviceAccessAsync IID_ICreateDeviceAccessAsync "{}" #comfunc global ICreateDeviceAccessAsync_Cancel 3 #comfunc global ICreateDeviceAccessAsync_Wait 4 int #comfunc global ICreateDeviceAccessAsync_Close 5 #comfunc global ICreateDeviceAccessAsync_GetResult 6 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。