UpdateDriverFroPlugAndPlayDevices

Can the function manage to unload the existing driver if some user-mode applications have handles on the currently running driver? What action does it take if it cannot unload the exisitng driver. The DDK documentation doesn’t provide any info on this scenario.

TIA,
Giri.

There is no way to force a driver to unload. If there are opened handles or
reference counts to it, it will stay loaded. This is by design. However,
in any case, the driver will receive an IRP to indicate the device is about
to go offline (read about IRP_MN_QUERY_REMOVE_DEVICE, it talks about
updating a driver). Then you can signal the application and eventually
release that handle so that the driver can unload.

But if you did not write that application, I believe there’s nothing you can
do.

Mat

-----Original Message-----
From: Seshagiri Babu K V [mailto:xxxxx@sasken.com]
Sent: Friday, March 07, 2003 5:08 AM
To: NT Developers Interest List
Subject: [ntdev] UpdateDriverFroPlugAndPlayDevices

Can the function manage to unload the existing driver if some user-mode
applications have handles on the currently running driver?? What action does
it take if it cannot unload the exisitng driver. The DDK documentation
doesn’t provide any info on this scenario.
?
TIA,
Giri.

You are currently subscribed to ntdev as: xxxxx@guillemot.com
To unsubscribe send a blank email to xxxxx@lists.osr.com