Hello,
does anyone know what causes WdfUsbTargetPipeReadSynchronously to return
0xC0000001 (STATUS_UNSUCCESSFUL)?
I’m trying to read from a interrupt pipe, but it always returns that
error. Here is the code I’m using (error handling omitted):
PUCHAR outBufferC = NULL;
…
WdfRequestRetrieveOutputBuffer(Request, 15, &outBufferC, NULL);
WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&memDesc, outBufferC, 15);
status = WdfUsbTargetPipeReadSynchronously(pDevContext->InterruptPipe,
NULL,
NULL,
&memDesc,
(PULONG)&bytesReturned);
//-------------------------------------------------------
The pipe was configured like this:
…
UsbInterface=WdfUsbTargetDeviceGetInterface(pDeviceContext->UsbDevice,0);
pipe = WdfUsbInterfaceGetConfiguredPipe(UsbInterface, 0, NULL);
WdfUsbTargetPipeSetNoMaximumPacketSizeCheck(pipe);
pDeviceContext->UsbInterface = UsbInterface;
pDeviceContext->InterruptPipe = pipe;
//-------------------------------------------------------
One final note: the device is low-speed, so MaximumPacketSize was forced
to 8 (because endpoint descriptor was wrongly configured with 15, and I
have no access to the firmware).
Thanks for your help,
- AS