l***@hotmail.it
2007-09-13 15:50:26 UTC
Hello to all,
I'm developing a device driver for an usb gaming scanner using
WdfUsbTargetPipeConfigContinuousReader to read incoming data. It works
quite well until I can store all incoming data to WDFREQUEST output
buffer and use WdfRequestCompleteWithInformation with STATUS_SUCCESS
and the trasferred data amount as information.
The problem is that if I try to complete the request using
WdfRequestCompleteWithInformation with an error code and the
information parameter >0 I receive a bug check and the consequential
BSOD (module USBPORT).
The old version of this driver uses wdm only architecture; without any
framework. When the user supplied an insufficient output buffer, I
completed the request with STATUS_BUFFER_TOO_SMALL code supplying the
required amount of data as information parameter. In this way, at the
second call, user mode application has been informed on how many bytes
it has to allocate.
Is it impossible to use the same approach with kmdf?
If I complete the request using WdfRequestComplete, or leaving
information parameter to zero, always using STATUS_BUFFER_TOO_SMALL,
all works fine.
Sorry for my english and greetings from Rome.
I'm developing a device driver for an usb gaming scanner using
WdfUsbTargetPipeConfigContinuousReader to read incoming data. It works
quite well until I can store all incoming data to WDFREQUEST output
buffer and use WdfRequestCompleteWithInformation with STATUS_SUCCESS
and the trasferred data amount as information.
The problem is that if I try to complete the request using
WdfRequestCompleteWithInformation with an error code and the
information parameter >0 I receive a bug check and the consequential
BSOD (module USBPORT).
The old version of this driver uses wdm only architecture; without any
framework. When the user supplied an insufficient output buffer, I
completed the request with STATUS_BUFFER_TOO_SMALL code supplying the
required amount of data as information parameter. In this way, at the
second call, user mode application has been informed on how many bytes
it has to allocate.
Is it impossible to use the same approach with kmdf?
If I complete the request using WdfRequestComplete, or leaving
information parameter to zero, always using STATUS_BUFFER_TOO_SMALL,
all works fine.
Sorry for my english and greetings from Rome.