I want to change interface setting, and the code as below:
PURB urb;
USBD_CONFIGURATION_HANDLE hConfig;
PUSB_CONFIGURATION_DESCRIPTOR pcd;
USBD_INTERFACE_LIST_ENTRY interfaces[4];
PUSB_INTERFACE_DESCRIPTOR pid;
PURB pUrbSelIntf = NULL;
...
urb = USBD_CreateConfigurationRequestEx(pcd, interfaces);
status = SendUrb (Adapter, selurb);
hconfig = selurb->UrbSelectConfiguration.ConfigurationHandle;
..
pUrbSelIntf = (PURB)ExAllocatePool(NonPagedPool,
GET_SELECT_INTERFACE_REQUEST_SIZE(pid->bNumEndpoints));
UsbBuildSelectInterfaceRequest(pUrbSelIntf,
GET_SELECT_INTERFACE_REQUEST_SIZE(pid->bNumEndpoints),
hconfig,
0,
1);
status = SendUrb (Adapter, pUrbSelIntf);
but when I submit the pUrbSelIntf, OS bring blue screen. why? How can I do
this?
Tks!