UWP & Custom Device/Driver Access

For some reason, FromIdAsync throws unauthorized exception (hresult->access denied) which I wasn’t able to root cause so far. The device interface was accessible via C++ app and able to invoke an ioctl without any issues. The UWP is basically a slightly modified UWP sample CustomCapability. WPP driver traces shows EvtDeviceFileCreate and EvtFileClose (immediately) were called when FromIdAsync was executed. Not clear (possible due to the authorization issue) why EvtFileClose was immediately invoked. I tried deploying modified device meta and was no help. Attempted to create SCCD file with “AllowAny” but that caused deployment error. I was originally using the same SCCD that came with the sample. I only set “DeveloperModeOnly” to true.

Same issue with Toaster driver sample (modified to include custom property and loaded against some random USB device) and CustomCapability sample almost as is (just changed the device interface GUID) in developer mode (debug deployment). This was on latest insider preview OS build 19002. Any ideas?

Hey there, I know it has been a month, but I encountered the same issue recently. I managed to find the problem on the INF file. I was using the wrong driver name in the interface section of my INF file ([WDMPNPB003_Device.NT.Interfaces] if you copied it from MSDN HSA for Driver developers).