Re: DeviceIoControl with OVERLAPPED and KMDF



Johan Paul wrote:
Ah! Thanks Maxim! This would explain the behavior they are seeing in
user mode - and not reading the documentation carefully enough ;)

*AND* not checking GetLastError.

Now that we have teleconferencing technology, we should use it for some
worthwhile purpose.... like sending lousy programmers to training seminars
in Siberia without punishing the presenters.



Br,

Johan



It returns FALSE and LastError is ERROR_IO_PENDING, this is OK, now
wait for the completion.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@xxxxxxxxxxxxxxxxxxxx://www.storagecraft.com

"Johan Paul" <johan.p...@xxxxxxxxx> wrote in message

news:c67d440c-64a9-48bc-99f0-ec19b5fc723d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Don, Thanks for you reply!

I am still unable to test this myself, but I got a note that if
DeviceIoControl() is called with OVERLAPPED, it will return FALSE. If
OVERLAPPED is NULL, DeviceIoControl() will succeed.

This surprised me. Like you replied, I thought KMDF (or my driver, no
matter if it is KMDF or WDM) should not care about that, since the IO
manager should deal with the dispatch, and send requests to the
driver, right?

BR,

Johan

It should not matter whether it is KMDF or WDM. For a driver
consider all calls to be OVERLAPPED.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"Johan Paul" <johan.p...@xxxxxxxxx> wrote in message

news:47366837-2aea-43ad-8097-53a9dddf4627@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi all,

In a driver written with KMDF 1.5, should I need to care if a user
mode application sends a IOCTL with OVERLAPPED structure set or
not in DeviceIoControl() (opened with CreateFile with flag
FILE_FLAG_OVERLAPPED set)? Now I hear that DeviceIoControl() fails
if OVERLAPPED is specified but I am not sure if that should
matter...

BR,

Johan Paul


.



Relevant Pages

  • Re: WDF and 32 bit process
    ... Don Burn (MVP, Windows DDK) ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... The interrupt status is passed to the user mode application to determine ...
    (microsoft.public.development.device.drivers)
  • Re: WDF and 32 bit process
    ... The driver basically uses a manual to queue to hold the ... When the interrupt fires (continuous reader ... Don Burn (MVP, Windows DDK) ... The interrupt status is passed to the user mode application to ...
    (microsoft.public.development.device.drivers)
  • Re: sharing memory with user and kernel
    ... There is no need in going to kernel mode for virtual microphone driver, ... Maxim Shatskih, Windows DDK MVP ... I developed an application in user mode that capture audio data and stores ... the data in shared memory using CreateFileMapping and MapViewOfFile. ...
    (microsoft.public.development.device.drivers)
  • Re: DeviceIoControl with OVERLAPPED and KMDF
    ... user mode - and not reading the documentation carefully enough;) ... Maxim Shatskih, Windows DDK MVP ... DeviceIoControl() is called with OVERLAPPED, ... Like you replied, I thought KMDF (or my driver, no ...
    (microsoft.public.development.device.drivers)
  • Re: DeviceIoControl with OVERLAPPED and KMDF
    ... Maxim Shatskih, Windows DDK MVP ... DeviceIoControl() is called with OVERLAPPED, ... Like you replied, I thought KMDF (or my driver, no ...
    (microsoft.public.development.device.drivers)

Loading