none
IoRegisterPlugPlayNotification RRS feed

  • Question

  •  

    Hi ,

    I am trying to register IoRegisterPlugPlayNotification from a Virtual NDIS , to notify of the plug/unplug of the UMDF USB driver.

    This is being done in the NDIS MPInitializeEx function.

    I am stuck , in how to get the NDIS  DRIVER_OBJECT. 

    NdisMGetDeviceProperty , gives us the FDO DEVICE_OBJECT, but when i am using this FDO->DriverObject , the system crashes.

    Also , Do you suggest calling IoRegisterPlugPlayNotification , from the DriverEntry function ?

    Monday, June 3, 2013 11:06 AM

Answers

  • Record the DRIVER_OBJECT pointer at DriverEntry to a global variable, then use that as the argument for IoRegisterPlugPlayNotification.   Be sure to also unregister in your MiniportHaltEx routine.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, June 3, 2013 11:50 AM
  • Thanks Don , it worked. 
    • Marked as answer by Anupam Shukla Tuesday, June 4, 2013 6:41 AM
    Tuesday, June 4, 2013 6:41 AM

All replies

  • Record the DRIVER_OBJECT pointer at DriverEntry to a global variable, then use that as the argument for IoRegisterPlugPlayNotification.   Be sure to also unregister in your MiniportHaltEx routine.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, June 3, 2013 11:50 AM
  • Thanks Don , it worked. 
    • Marked as answer by Anupam Shukla Tuesday, June 4, 2013 6:41 AM
    Tuesday, June 4, 2013 6:41 AM