gpt4 book ai didi

c++ - WinRT API 无法获取 IDeviceIoControl

转载 作者:太空宇宙 更新时间:2023-11-04 14:08:14 29 4
gpt4 key购买 nike

我从 osrfx2 示例中获取了通过 guid 访问自定义驱动程序的基本代码。 http://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679

我尝试在 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。

谁能帮帮我

最佳答案

FWIW,您可能想查看“Access a custom driver”示例应用。

关于c++ - WinRT API 无法获取 IDeviceIoControl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16039720/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com