locked
Custom Driver Access---UnauthorizedAccessException

    Question

  • Hi  Guy,

    i just come across a very strange problem, hope you guys can give me some advise.

    i juest follow the Coustom Driver Access sample to write my own driver access app, actually, i can access the driver and send IO control code to the driver.

    But there are a problem fuzzy me a lot of times.

    1. intermittent return Access denied 

    a.)The same app,the same metadata, the same device ,the same OS, all the function can handled smoothly in the morning, but Access denied returned in afternoon.So strange!!! clear all the metadata in the local meta store folder(c:\ProgramData\Microsoft\Windows\DeviceMetaStore) and recopy the devie metadata to this folder and reboot the system,all turn to normal....What happed to my life,Just like a roller coaster.

    b.)most of times the access denied error returned from 

    CreateDeviceAccessInstance(InstancePath->Data(),
                                        GENERIC_READ ,//| GENERIC_WRITE,
                                        &access);

    more strange thing is some times i can successfully invoke CreateDeviceAccessInstance, but the errorr---- UnauthorizedAccessException ,returned from the I/O code property.

    it's more look like the following scenario:

    in the Custom Driver Access sample, i can successfully invoke Fx2Device.FromId(id); but when i get the SevenSegmentDisplay property, it's return UnauthorizedAccessException. Who can tell me why?

    c.) i have two onboard devices on the main board,one is a watchdog and one is a I2C temprature sensor, so i have two drivers to drive this two device, also i have two Windows stroe APP to handle those two devices.

    first, i copy the temprature metadata to the target device's DeviceMetaStore,and use the VS remote tool to deploy the temprature app from develop machine to the target machine. it's worked very good.

    then, i copy the watchdog metadata to the target device's DeviceMetaStore,also use the VS remote tool to deploy the app to the target machine.

    it's worked very good.

    then, i redeploy the temprature app to the target device, it's return Access denied ....Who can help me...?

    2. if i want publish my watchdog and temprature sensor app,how can i do?

        now,  although i can access the driver sometimes,i must set the testsigning on.when i do not set testsigning on, always return Access denied. i want to know if there is a way i can direct access the driver and i needn't set the testsigning on.

    Thank you guys.

    Wednesday, January 16, 2013 3:17 AM

All replies