Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Retrieving the Buffer for EvtIoDeviceControl in a KMDF Driver

69 views
Skip to first unread message

min

unread,
Dec 11, 2007, 11:21:52 AM12/11/07
to
After the application has called the function

DeviceIoControl( hDevice,
IOCTL_ISOCH_ATTACH_BUFFERS,
pIsochAttachBuffers,
ulBufferSize,
pIsochAttachBuffers,
ulBufferSize,
&dwBytesRet,
&overLapped);

the kernel (t1394_EvtIoDeviceControl function in
\WINDDK\6000\src\kmdf\1394\driver\ioctl.c)
retrieves the input buffer with

WdfRequestRetrieveInputBuffer(Request, 0, &ioBuffer, &bufLength) ; PVOID
ioBuffer;

I tried to get the output buffer, so I set

PVOID outputBuffer = NULL;

and used

WdfRequestRetrieveOutputBuffer(Request, 0, &outputBuffer, &bufLength);

With this function, I have got the buffer's adress in outputBuffer.
(*(PISCHO_ATTACH_BUFFER)outputBuffer shows the buffer's adress and it's the
same adress as input buffer)

Because I want to get some Information(pIsochDescriptor) in application, I
tried to write in the outputBuffer with

RtlCopyMemory((PISOCH_ATTACH_BUFFERS)outputBuffer, IsochAttachBuffers,
OutputBufferLength);
( I tried also with *((PISOCH_ATTACH_BUFFERS)outputBuffer) =
*IsochAttachBuffers; )

After that, I can see that the informations are written in the outputBuffer.
But if I try to get the Information in user-mode
(I mean after the calling DeviceIoControl function), it seems that the
informations got lost (pIsochAttachBuffers->pIsochDescriptor is still zero.)

Can somebody explain this? How can I bring some information from kernel to
user mode (application)?


thanks in advance
min.


Abhishek R

unread,
Dec 11, 2007, 3:43:22 PM12/11/07
to
When completing the request, did you remember to set the request information
to the number of bytes you transferred to the buffer?
See the MSDN documentation for WdfRequestCompleteWithInformation.

"min" <m...@amo.de> wrote in message news:5s7rp8F...@mid.dfncis.de...

min

unread,
Dec 12, 2007, 9:36:45 AM12/12/07
to
Thanks for your advice. :-)
I didn't think about that.

"Abhishek R" <abhi...@online.microsoft.com> schrieb im Newsbeitrag
news:up0Q7ZDP...@TK2MSFTNGP03.phx.gbl...

0 new messages