Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?
From: Doron Holan [MS] (doronh_at_nospam.microsoft.com)
Date: 09/08/04
- Next message: Tom: "Re: Can a 16bit PC card request PCI interrupts ?"
- Previous message: Bob: "Re: Bugcode Parameters"
- In reply to: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Next in thread: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Reply: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 21:53:22 -0700
this advice is a bit confusing. What Beverly meant to say is that if you
are going to mark the irp as pending, you must return STATUS_PENDING. You
may still call IoCompleteRequest from the dispatch routine, but if you had
previously marked the irp as pending, STATUS_PENDING must be returned. If
you have not marked the irp as pending, you can return the status that was
set in the PIRP.
d
-- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "Beverly Brown" <bbucetrap@hotmail.com> wrote in message news:u4ZU9mVlEHA.1152@TK2MSFTNGP11.phx.gbl... > Actually, you do need to do something special in the driver. For > overlapped > IOCTLs you need to queue the IRP, mark it as pending, set a cancel routine > (you ahve to write a cancel routine to set) and return STATUS_PENDING from > your dispatch routine. Do not call IoCompleteRequest from the dispatch > routine. Instead you call it later after removing it from your queue. > > For non-overlapped you don't do any of the above. You call > IoCompleteRequest > from your dispatch routine. > > Beverly > > > "Don Burn" <burn@stopspam.acm.org> wrote in message > news:10jrlvos6k6ko11@corp.supernews.com... >> The I/O manager takes care of this. You should design your IOCTL code >> based >> on what happens in the driver, i.e. requests that can be done quickly >> with >> no long waits should just complete. Requests that must wait for data or >> other requests, should be marked pending and handled asynchronously. >> >> >> -- >> Don Burn (MVP, Windows DDK) >> Windows 2k/XP/2k3 Filesystem and Driver Consulting >> Remove StopSpam from the email to reply >> >> "Dennis Burns" <dburns@rtessentials.com> wrote in message >> news:ONttiBPlEHA.2504@TK2MSFTNGP14.phx.gbl... >>> As a relative newbie at driver design, I'm struggling to get the "big >>> picture". I'm still struggling with this issue, relating to how my >>> driver >> is >>> called. >>> >>> An IOCTL of my own creation may be called using the user-mode function >>> DeviceIoControl, in either a synchronous (non-overlapped) or >>> asynchronous >>> (overlapped) mode. Do I need to consider the calling mode when >> implementing >>> the driver? Or, will the IO Manager take care of the user-mode >>> notification/completion details? >>> >>> Thanks in advance for the help, >>> Dennis >>> >>> >> >> > >
- Next message: Tom: "Re: Can a 16bit PC card request PCI interrupts ?"
- Previous message: Bob: "Re: Bugcode Parameters"
- In reply to: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Next in thread: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Reply: Beverly Brown: "Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|