ホーム › Media.DeviceManager › IMDSPDeviceControl
IMDSPDeviceControl
COMメソッド 8
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
| pdwStatus | DWORD* | out | 再生/録音などデバイス制御の現在状態を示すフラグを受け取る出力。 |
| pdwCapabilitiesMask | DWORD* | out | デバイスが対応する制御機能を示す能力ビットマスクを受け取る出力。 |
vtbl 5 HRESULT Play()
vtbl 6 HRESULT Record(WAVEFORMATEX* pFormat)
| pFormat | WAVEFORMATEX* | in | 録音に使用する音声フォーマットを指定するWAVEFORMATEX。NULL可で既定形式を使う。 |
vtbl 7 HRESULT Pause()
vtbl 8 HRESULT Resume()
vtbl 9 HRESULT Stop()
| fuMode | DWORD | in | シーク基準を示すWMDM_SEEK系フラグ。先頭/現在位置/末尾基準を指定する。 |
| nOffset | INT | in | シーク量を符号付き整数で指定する。基準位置からの相対値。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IMDSPDeviceControl "{1DCB3A14-33ED-11D3-8470-00C04F79DBC0}" #usecom global IMDSPDeviceControl IID_IMDSPDeviceControl "{}" #comfunc global IMDSPDeviceControl_GetDCStatus 3 var #comfunc global IMDSPDeviceControl_GetCapabilities 4 var #comfunc global IMDSPDeviceControl_Play 5 #comfunc global IMDSPDeviceControl_Record 6 var #comfunc global IMDSPDeviceControl_Pause 7 #comfunc global IMDSPDeviceControl_Resume 8 #comfunc global IMDSPDeviceControl_Stop 9 #comfunc global IMDSPDeviceControl_Seek 10 int,int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_IMDSPDeviceControl "{1DCB3A14-33ED-11D3-8470-00C04F79DBC0}" #usecom global IMDSPDeviceControl IID_IMDSPDeviceControl "{}" #comfunc global IMDSPDeviceControl_GetDCStatus 3 sptr #comfunc global IMDSPDeviceControl_GetCapabilities 4 sptr #comfunc global IMDSPDeviceControl_Play 5 #comfunc global IMDSPDeviceControl_Record 6 sptr #comfunc global IMDSPDeviceControl_Pause 7 #comfunc global IMDSPDeviceControl_Resume 8 #comfunc global IMDSPDeviceControl_Stop 9 #comfunc global IMDSPDeviceControl_Seek 10 int,int ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。