Hello,
I have a wait queue in my IODeviceControl to wait for interrupt happen. When
I need to wait, I will forward my IOCTL request to the queue, when interrupt
happen, in DPC, I retrieve the request, and call:
WdfRequestCompleteWithInformation(request,
STATUS_SUCCESS,
outputBufferLenght);

to complete request. My application is C++ with Java native interface. I
found that if I call above function with outputBufferLenght, Exception will
happen in Java object which is If I call above function with 0 lenght,
everything is OK except I didn't get my return data from IOCTL.

My I/O type is buffered, my buffer is not big, about 48 bytes.
My question is what above function did to my output buffer in two cases? How
come it cause Java exception?

Thanks,

May

Re: Question about WdfRequestCompleteWithInformation by Eliyas

Eliyas
Wed Oct 17 07:33:00 PDT 2007

What are you filling in the buffer? May be your java object doesn't like the
data it sees in the output buffer. Cause of exception is local to your
application. Turn on framework verifier for your driver. If there is
something wrong in the way you are completing reqeust, verifier will catch
it.

-Eliyas

"May" <May@discussions.microsoft.com> wrote in message
news:D737E190-0140-4650-90ED-BA59FFEFBB97@microsoft.com...
> Hello,
> I have a wait queue in my IODeviceControl to wait for interrupt happen.
> When
> I need to wait, I will forward my IOCTL request to the queue, when
> interrupt
> happen, in DPC, I retrieve the request, and call:
> WdfRequestCompleteWithInformation(request,
> STATUS_SUCCESS,
> outputBufferLenght);
>
> to complete request. My application is C++ with Java native interface. I
> found that if I call above function with outputBufferLenght, Exception
> will
> happen in Java object which is If I call above function with 0 lenght,
> everything is OK except I didn't get my return data from IOCTL.
>
> My I/O type is buffered, my buffer is not big, about 48 bytes.
> My question is what above function did to my output buffer in two cases?
> How
> come it cause Java exception?
>
> Thanks,
>
> May