Metro设备应用程序 - 拒绝访问 [英] Metro Device Application - Access Denied

查看:129
本文介绍了Metro设备应用程序 - 拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法获得通过metro应用程序连接到我的驱动程序的访问权限。对不起,很长的帖子..
$


我正在运行Windows 8 Consumer Preview Build 8250.





1.设备元数据包是使用设备元数据向导应用程序创建的。 (我已尝试过Windows 7和Windows 8两种版本)





2.我已经验证在加载硬件设备的驱动程序时元数据已转换到'DeviceMetadataCache'文件夹。







3. C#应用程序项目中的"Package.appxmanifest"已填充了驱动程序的标识名称,发布者,应用程序ID和DeviceCapability设备接口GUID 。与设备元
数据包中的软件信息匹配。





4.已安装驱动程序,并使用WDM实现(这是一个问题吗?)。在系统上注册驱动程序时,已调用驱动程序.inf和AND'IoSetDeviceInterfacePropertyData'函数。







5.我已将Managed C ++示例中的代码示例转换为纯C#实现。 (我还有一个托管C ++库,有这些调用,所以我可以验证我仍然通过托管C ++实现获得访问被拒绝错误,使
确保转换不是问题。)







$
6.在ICreateDeviceAccessAsync对象上调用'GetResult'时,会出现Access Denied错误。





7.我试过'bcdedit。 exe -set TESTSIGNING ON',即使我的驱动程序已签名,并且在任何一种情况下都可以正常加载。



问题: 



  1。我错过了一些明显的东西吗?
b
  2。这个应用程序试图访问的驱动程序是使用WDM,是吗? (使用标准的'IoDeviceCreate')。

  3。我已经看到一些帖子提到使用TraceView来观看deviceaccess.dll输出,但我没有运气得到它的运气。有人能提供更详细的信息吗?



感谢您的帮助。


<彼得·格罗塞特


Alereon

解决方案

彼得,


1)您是否可以使用未升级的桌面应用程序打开界面?


2)您是否在应用元数据之前启用了测试签名和重启?


使用UMDF,KMDF或WDM驱动程序没有问题。 如果您从Fx2示例中遵循THROW_HR中的ReCreateException模式并且不吞下该异常,则当您遇到此错误时,您可能会在VS中看到更多详细信息。 


祝福 - Eric






I have been unable to obtain access permissions to connect to my driver through a metro application. Sorry for the long post..

I am running Windows 8 Consumer Preview Build 8250.


1. Device metadata package was created using the device metadata wizard application. (I have tried both windows 7 and windows 8 variants)


2. I have verified that the Metadata has been transitioned to the 'DeviceMetadataCache' folder upon the driver loading for my hardware device.



3. 'Package.appxmanifest' within the C# application project has been populated with the Identity Name, Publisher, Application ID, and the DeviceCapability device interface GUIDs for the drivers. Which matches the software information within the device meta data package.


4. The driver has been installed, and is implemented with WDM (Is this a problem?). The driver .inf, AND 'IoSetDeviceInterfacePropertyData' function has been called when the driver is registered on the system.



5. I have converted the code example from the Managed C++ example, into a pure C# implementation. (I also have a managed C++ library, with these calls, so that I could verify I still get the access denied error through the managed C++ implemetation, to make sure the conversion wasn't the problem.)




6. When calling 'GetResult' on the ICreateDeviceAccessAsync object, an Access Denied error occurs.


7. I have tried 'bcdedit.exe -set TESTSIGNING ON', even though my driver is signed, and loads fine in either case.

Questions: 

 1. Am I missing something obvious?
 2. The driver this application is attempting to access is using WDM, is that OK? (Using standard 'IoDeviceCreate').
 3. I have seen some posts that mention using TraceView to watch deviceaccess.dll output, but I haven't had any luck getting this to work. Is anyone able to provide more detailed information on how to do this?

Thanks for any help.

Peter Groset

Alereon

解决方案

Peter,

1) Are you able to open the interface using a desktop application running unelevated?

2) Did you enable test signing and reboot before applying the metadata?

There's no problem using a UMDF, KMDF or WDM driver.  If you follow the ReCreateException pattern in the THROW_HR from the Fx2 sample and do not swallow the exception, you may see some more details in VS when you run into this error. 

Best Wishes - Eric




这篇关于Metro设备应用程序 - 拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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