2013-04-16 42 views
0

我已經通過guid從osrfx2示例獲取了訪問自定義驅動程序的基本代碼。 http://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679WinRT API無法獲取IDeviceIoControl

我曾嘗試在WinRT中,它訪問ndislwf過濾驅動

ComPtr<ICreateDeviceAccessAsync> access;  
ComPtr<IDeviceIoControl> deviceControl; 

HRESULT hr = CreateDeviceAccessInstance(
    (PCWSTR)L"\\Device\\{5cbf81bd-5055-47cd-9055-a76b2b4e3697}", 
    GENERIC_READ | GENERIC_WRITE, 
    &access); // Returns S_OK. 

hr = access->Wait(INFINITE); // Returns S_OK. 

hr = access->GetResult(IID_IDeviceIoControl,(void **)&deviceControl); // Returns E_INVALIDARGS. 

我無法獲得的DeviceControl發送ioctl來實現應用程序。

我在元數據文件中也提到了guid。

有沒有人請幫助我。

回答