How a Kernel mode Driver detects that if Device is DISABLED/ENABLE D through Device manager.

Dear Group,

I have some doubts regarding the following,

If we Disable/Enable/Upgrade the Driver for a particular device through Device manager ,

  1. How a kernel mode driver will come to know about this action.
  2. If the driver receive some IRP/message/Event about this action,
    what are the further steps for a driver should do.
  3. How the USER mode Applications will come to know about this action.

Thanks,


TV dinner still cooling?
Check out “Tonight’s Picks” on Yahoo! TV.

  1. your driver does not know about the specific action. A driver has
    no idea about the difference between a disable or an uninstall or an
    upgrade, it just sees a query remove -> remove.

  2. your driver will receive a query remove -> remove on the device.
    You must succeed the query remove so that the action can be taken

  3. applications are notified about the impending removal of a device if
    they have a handle open on the device. The application would then
    register for handle notifications on the handle
    (RegisterDeviceNotification,
    http://msdn2.microsoft.com/en-us/library/aa363431.aspx, type
    DBT_DEVTYP_HANDLE) and close the handle to allow the query remove to
    succeed.

d

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of aare ravinder
Sent: Monday, April 09, 2007 3:58 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How a Kernel mode Driver detects that if Device is
DISABLED/ENABLE D through Device manager.

Dear Group,

I have some doubts regarding the following,

If we Disable/Enable/Upgrade the Driver for a particular device through
Device manager ,

  1. How a kernel mode driver will come to know about this action.

  2. If the driver receive some IRP/message/Event about this
    action,

what are the further steps for a drivershould do.

  1. How the USER mode Applications will come to know about this action.

Thanks,


TV dinner still cooling?
Check out “Tonight’s Picks”
http:</http:> on Yahoo! TV.
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer