Eliyas
Sun Sep 11 11:46:00 CDT 2005
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c0d59eb3f1c7057a/3df9934d68cdaa0f?lnk=st&q=NdisMRegisterDevice+NDIS+Eliyas+NetVmini&rnum=1#3df9934d68cdaa0f
--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
"Yoke" <mdyoke@community.nospam> wrote in message
news:BAC50F7D-F522-4AE7-A6EC-EF9A25CF5188@microsoft.com...
> My surprise remove handler completes the IRP as well. One other detail I
> should probably mention is that my driver creates a singleton device
> object
> that gets destroyed when all of my devices have been removed. This is the
> device object that the user mode app targets.
>
> Mike
>
>
> "Pavel A." wrote:
>
>> In your scenario, replace 5) to: driver handles PnP surprise removal
>> event and cancels (or completes) the IRP .
>> Then it will be ok.
>>
>> --PA
>>
>> "Yoke" <mdyoke@community.nospam> wrote in message
>> news:3C80BC77-30C2-407A-AEE0-4911B23F780F@microsoft.com...
>> > Here is a clarification of the scenario I'm interested in, just to make
>> > sure
>> > I communicated correctly:
>> >
>> > 1) User mode app starts.
>> > 2) Plug in USB device, driver loads.
>> > 3) User mode app sends request to the driver that pends and blocks the
>> > app.
>> > 4) Detach USB device.
>> > 5) Remove Device routine runs and completes IRP with STATUS_CANCELLED
>> > and
>> > unblocks the app.
>> > 6) App closes handle.
>> >
>> > I would have expected the driver unload routine to be invoked following
>> > step
>> > 6.
>> >
>> > "Don Burn" wrote:
>> >
>> >> The OS will not call unload if there is an IRP pending.
>> >>
>> >>
>> >> --
>> >> Don Burn (MVP, Windows DDK)
>> >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> >> Remove StopSpam from the email to reply
>> >>
>> >>
>> >>
>> >> "Yoke" <mdyoke@community.nospam> wrote in message
>> >> news:271D9CF1-4655-426E-9836-33C537D9A980@microsoft.com...
>> >> >I have a user mode application that keeps an IRP pending until a
>> >> >condition
>> >> >is
>> >> > satisfied or the device is removed. The driver's remove device
>> >> > routine
>> >> > completes the IRP with STATUS_CANCELLED. The user mode app then
>> >> > closes the
>> >> > handle. My expectation was that the driver unload routine would be
>> >> > invoked
>> >> > at
>> >> > this point, but I'm not seeing that happen. Is this expected
>> >> > behavior or
>> >> > do I
>> >> > have a bug?
>> >> >
>> >> > Mike
>> >>
>> >>
>> >>
>>
>>
>>