ホーム › Devices.Geolocation › ILocationEvents
ILocationEvents
COMメソッド 2
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT OnLocationChanged(GUID* reportType, ILocationReport* pLocationReport)
| reportType | GUID* | in | 変化したレポートの種別を示すGUID。 |
| pLocationReport | ILocationReport* | inoptional | 新しい位置情報を保持するILocationReport。 |
vtbl 4 HRESULT OnStatusChanged(GUID* reportType, LOCATION_REPORT_STATUS newStatus)
| reportType | GUID* | in | 状態が変化したレポートの種別を示すGUID。 |
| newStatus | LOCATION_REPORT_STATUS | in | 新しいレポート状態を示すLOCATION_REPORT_STATUS値。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_ILocationEvents "{CAE02BBF-798B-4508-A207-35A7906DC73D}" #usecom global ILocationEvents IID_ILocationEvents "{}" #comfunc global ILocationEvents_OnLocationChanged 3 var,sptr #comfunc global ILocationEvents_OnStatusChanged 4 var,int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ILocationEvents "{CAE02BBF-798B-4508-A207-35A7906DC73D}" #usecom global ILocationEvents IID_ILocationEvents "{}" #comfunc global ILocationEvents_OnLocationChanged 3 sptr,sptr #comfunc global ILocationEvents_OnStatusChanged 4 sptr,int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。