CreateUsbIoTargets Failing

Dear List,

I modified sample wdk-umdf-usb-fx2_driver to custom device. When I ran the PnPDTests against the driver, all the simple, failquerystop, failrestart tests are getting executing as expected but the moment I select newresources test, the system simply restarts.

I started debugging the driver from OnPrepareHardware point and verified return values. In the CreateUsbIoTargets function after queryinterface there is a framework call CreateUsbTargetDevice as below:

hr = pIUsbTargetFactory->CreateUsbTargetDevice(&pIUsbTargetDevice);

The return value of hr is E_ACCESSDENIED. Since it is a UMDF framework call, I not able to conclude the probable error.

Can any UMDF experts suggest what makes the call to return E_ACCESSDENIED value. Note that this does not happen in the normal driver installation. It happens only when the newresouces of PnPDTest is called.

Regards.