WinRT API ICreateDeviceAccessAsync-> GetResult()因E_AccessDenied而失败 [英] WinRT API ICreateDeviceAccessAsync->GetResult() failing with E_AccessDenied

查看:52
本文介绍了WinRT API ICreateDeviceAccessAsync-> GetResult()因E_AccessDenied而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 

我正在尝试访问邻近设备以发送Ioctl。

I am trying to access a proximity device to send an Ioctl.

我不知道如何指定驱动程序的设备元数据。

I don't know how to specify device metadata for driver.

所以当我尝试获得结果时 -

so when I try to get result like -

hr = PdeviceAccess-> GetResult(); /// EACCESSDENIED

hr = PdeviceAccess->GetResult();/// EACCESSDENIED

在此先感谢

Niraj。

推荐答案

感谢您在此发帖。

您能告诉我您的项目类型吗? 根据您的描述,问题与硬件开发有关。

Could you tell me what type of your project?  According to your description, the issue is related to hardware development.

根据错误消息,当前用户无法访问设备,您是否尝试使用管理员来运行应用程序。

According to the error message, the current user cannot access the device, did you try to use the administrator to run the application.

据我所知,驱动程序的设备元数据包含以下选项

As far as I know that the device metadata of driver consists of the following option


  • 供应商名称
  • 设备的型号名称和说明
  • 设备类别
  • Windows应用商店设备应用
  • 特权应用
  • 设备的自动播放处理程序
  • 设备通知处理程序

设备元数据包包含存储在cabinet文件中的多个XML文件。每个文件都指定设备属性的各种组件。

A device metadata package includes multiple XML files stored in a cabinet file. Each file specifies various components of the device’s attributes.

如果要获取驱动程序的元数据,可以访问这些XML文件。

If you want to get the metadata of driver, you could access the these XML file.

有关详细信息,请参阅以下链接:

For more information, please see the below link:

https://msdn.microsoft.com/en-us/library/windows/hardware/dn465877(v = vs.85).aspx

最诚挚的问候,

Hart


这篇关于WinRT API ICreateDeviceAccessAsync-> GetResult()因E_AccessDenied而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆