Windows获取设备属性

时间:2015-06-21 20:48:53

标签: c++ windows kernel audio-streaming

所以我试图理解Windows Kernel Streaming和ksproxy,我很困惑我把“SOMETHING”放在哪里。我不是想要获得特定的财产。我想知道如何获得一般属性(例如:友好名称)。这是我到目前为止所拥有的。顺便说一下,现在初始化代理和uninitialize代理只需调用CoInitialize和CoUninitialize。

cout << InitializeProxy() << endl;

HRESULT rc;
HANDLE device;
KSPROPERTY property = { SOMETHING, SOMETHING, KSPROPERTY_TYPE_GET };
SOMETHING value;

cout << (rc = KsOpenDefaultDevice(KSCATEGORY_CAPTURE, GENERIC_READ, &device)) << endl;
cout << (rc = KsSynchronousDeviceControl(device, IOCTL_KS_PROPERTY, &property, sizeof(property), &value, sizeof(value), NULL)) << endl;


cout << UninitializeProxy() << endl;

0 个答案:

没有答案