Win32 API 日本語リファレンス
ホームMedia.DirectShow › IAMExtDevice

IAMExtDevice

COM
IIDb5730a90-1a2c-11cf-8c23-00aa006b6814継承元IUnknown自前メソッド開始 vtbl3

メソッド 8

vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。

vtbl 3 HRESULT GetCapability(INT Capability, INT* pValue, DOUBLE* pdblValue)
CapabilityINTin問い合わせる外部デバイス機能の種別をED_*定数で指定する。
pValueINT*out整数型の機能値を受け取る出力ポインタ。
pdblValueDOUBLE*out浮動小数型の機能値を受け取る出力ポインタ。
vtbl 4 HRESULT get_ExternalDeviceID(LPWSTR* ppszData)
ppszDataLPWSTR*out外部デバイスの識別子文字列を受け取るポインタ。COMメモリで割り当てられる。
vtbl 5 HRESULT get_ExternalDeviceVersion(LPWSTR* ppszData)
ppszDataLPWSTR*out外部デバイスのバージョン文字列を受け取るポインタ。COMメモリで割り当てられる。
vtbl 6 HRESULT put_DevicePower(INT PowerMode)
PowerModeINTinデバイスの電源状態(On/Standby/Off)をED_POWER_*定数で指定する。
vtbl 7 HRESULT get_DevicePower(INT* pPowerMode)
pPowerModeINT*out現在の電源状態を受け取る出力ポインタ。
vtbl 8 HRESULT Calibrate(UINT_PTR hEvent, INT Mode, INT* pStatus)
hEventUINT_PTRinキャリブレーション完了通知に使うイベントハンドル。
ModeINTinキャリブレーションのモードを指定する。
pStatusINT*outキャリブレーション結果ステータスを受け取る出力ポインタ。
vtbl 9 HRESULT put_DevicePort(INT DevicePort)
DevicePortINTinデバイスが接続される通信ポートをDEV_PORT_*定数で指定する。
vtbl 10 HRESULT get_DevicePort(INT* pDevicePort)
pDevicePortINT*out現在のデバイス接続ポートを受け取る出力ポインタ。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

出力引数:
#define global IID_IAMExtDevice "{B5730A90-1A2C-11CF-8C23-00AA006B6814}"
#usecom global IAMExtDevice IID_IAMExtDevice "{}"
#comfunc global IAMExtDevice_GetCapability              3 int,var,var
#comfunc global IAMExtDevice_get_ExternalDeviceID       4 var
#comfunc global IAMExtDevice_get_ExternalDeviceVersion  5 var
#comfunc global IAMExtDevice_put_DevicePower            6 int
#comfunc global IAMExtDevice_get_DevicePower            7 var
#comfunc global IAMExtDevice_Calibrate                  8 sptr,int,var
#comfunc global IAMExtDevice_put_DevicePort             9 int
#comfunc global IAMExtDevice_get_DevicePort             10 var
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。