[UWP]Hardware support application (HSA) UWP question RRS feed

  • Question

  • By referring CustomCapability sample, I'm trying to access my custom device via custom capability. I got UnaurhorizedAccessException "Acccess is denied" at sample code in Scenario2_DeviceCommect "CustomDevice.FromIdAsync(MyDeviceId, DeviceAccessMode.ReadWrite, DeviceSharingMode.Exclusive)".

    How do I identify this "Access denied" problem caused? Custom capability SCCD problem? Custom device driver function/INF problem? Or other application problem?

    Already done conditions:

    1. Got custom capability string. Modify device driver INF with custom capability and install success in driver testing mode in Win10 1809.

    2. Modify UWP sample SCCD (not signed yet), Package.appxmanifest. Build and run successful in developer mode. 

    3. Replace my custom device interface GUID and enumerate success via "DeviceWatcher".

    Wednesday, January 2, 2019 7:57 AM

All replies

  • Hi ,

    Since the problem is more related to Windows Hardware WDK and Driver Development, I'll help you to move this thread to the Windows Hardware WDK and Driver Development Forum. You could get more professional support there.

    Thank you for your patience.

    Best regards,



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, January 3, 2019 2:45 AM
  • Hi Archer64,

    Currently DeviceSharingMode.Exclusive is not allowed via the Windows.Devices.Custom API.  This could be what is causing your access denied error.  If you definitely need exclusive, we do allow this currently via the Win32 APIs if you are able to go that route (Call CreateFile2FromApp then the normal IOCTL apis). 

    Thank you,


    Friday, January 4, 2019 8:29 PM
  • Hi Ben,

    Thanks for answer. I also tried DeviceSharingMode.Shared, and result still same. 

    I'm just thinking is this function (UWP via Windows.Devices.Custom/CustomCapability IOCTL) still not ready even in Win10 1809? So, the API will always block.


    Thursday, January 10, 2019 9:08 AM
  • Were you able to resolve this? 
    Monday, October 28, 2019 3:04 AM