Driver Not Restarting After Surprise Remove

Hi,

When a surprise removal of my device is performed (USB device) all goes well and my driver unload routine gets called. Now, when I plug the device back in, the driver will not start and Device Manager gives the following error:

Windows cannot load the device driver for this hardware because a previous instance of the device driver is still in memory. (Code 38)

When I do a !drivers (without the device attached) it does show that my driver is still kickin’.
Why would my driver still be loaded? Could it have anything to do with verifier running on my driver (I am about to test this)?

Thanks, Chris

Taking out verifier didn’t make a difference.

Chris

----- Original Message -----
From: Chris Dore
To: NT Developers Interest List
Sent: Wednesday, June 26, 2002 11:20 AM
Subject: [ntdev] Driver Not Restarting After Surprise Remove

Hi,

When a surprise removal of my device is performed (USB device) all goes well and my driver unload routine gets called. Now, when I plug the device back in, the driver will not start and Device Manager gives the following error:

Windows cannot load the device driver for this hardware because a previous instance of the device driver is still in memory. (Code 38)

When I do a !drivers (without the device attached) it does show that my driver is still kickin’.
Why would my driver still be loaded? Could it have anything to do with verifier running on my driver (I am about to test this)?

Thanks, Chris


You are currently subscribed to ntdev as: xxxxx@connecttech.com
To unsubscribe send a blank email to %%email.unsub%%

This probably means that you still have a pointer reference on the device object or a driver object. You can look at the debugger and dump the driver object (using !object or perhaps you have stashed away a pointer to it in a global variable). Then see if there are any device objects and go from there.

Note that the image will get unloaded only when the last reference to the driver object goes away. This in turn means all its device objects are gone as well. The verifier has nothing to do with the problem.


Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.
“Chris Dore” wrote in message news:xxxxx@ntdev…
Taking out verifier didn’t make a difference.

Chris

----- Original Message -----
From: Chris Dore
To: NT Developers Interest List
Sent: Wednesday, June 26, 2002 11:20 AM
Subject: [ntdev] Driver Not Restarting After Surprise Remove

Hi,

When a surprise removal of my device is performed (USB device) all goes well and my driver unload routine gets called. Now, when I plug the device back in, the driver will not start and Device Manager gives the following error:

Windows cannot load the device driver for this hardware because a previous instance of the device driver is still in memory. (Code 38)

When I do a !drivers (without the device attached) it does show that my driver is still kickin’.
Why would my driver still be loaded? Could it have anything to do with verifier running on my driver (I am about to test this)?

Thanks, Chris


You are currently subscribed to ntdev as: xxxxx@connecttech.com
To unsubscribe send a blank email to %%email.unsub%%