Problem with uninstallation of functional driver

Hi All,

I am writing a multi functional driver for a PCI
device.

I can install a driver and do all transaction without
any problem.

But while uninstalling the driver, I am getting
IRP_MN_QUERY_REMOVE_DEVICE and IRP_MN_REMOVE_DEVICE. I
am doing all the resource cleanup and deleting the
device object in IRP_MN_REMOVE_DEVICE. But once the
IRP_MN_REMOVE_DEVICE has been processed, the system
will be hung. WinDbg is not showing any error
messages. Also the device is not removed from the
system. It will be shown in device manager during the
next reboot.

Similarly while shutdown the OS, I am getting only
IRP_MN_SET_POWER. I am not getting any other IRPs like
IRP_MN_REMOVE_DEVICE. So that I could not free up the
allocated resources. Even my driver unloading is not
at all called.

Can any body tell how I can solve this problem.

Please help.

Thanks,
Sundar


Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

Hi,

First recommendation: use driver verifier. WinDbg will not print
warnings if you do something wrong; it is not responsible for checking
your driver. On the other hand, Driver Verifier (verifier.exe) is a
great tool for this purpose.

Also make sure you follow very closely the instructions in the DDK topic
“Removing a Device in a Function Driver”. Also make sure all references
to the device object are freed. Removing a device is very typical, it
should be easy to get it right.

You can use DeviceTree to debug issues related to the life of Device
Objects. It is a utility from OSR available on their website
(www.osronline.com).

Good luck!
Mat

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of sundarapandian
durairaj
Sent: Tuesday, June 08, 2004 5:45 AM
To: Windows System Software Devs Interest List
Cc: xxxxx@windows.microsoft.com; xxxxx@yahoo.com
Subject: [ntdev] Problem with uninstallation of functional driver

Hi All,

I am writing a multi functional driver for a PCI
device.

I can install a driver and do all transaction without
any problem.

But while uninstalling the driver, I am getting
IRP_MN_QUERY_REMOVE_DEVICE and IRP_MN_REMOVE_DEVICE. I
am doing all the resource cleanup and deleting the
device object in IRP_MN_REMOVE_DEVICE. But once the
IRP_MN_REMOVE_DEVICE has been processed, the system
will be hung. WinDbg is not showing any error
messages. Also the device is not removed from the
system. It will be shown in device manager during the
next reboot.

Similarly while shutdown the OS, I am getting only
IRP_MN_SET_POWER. I am not getting any other IRPs like
IRP_MN_REMOVE_DEVICE. So that I could not free up the
allocated resources. Even my driver unloading is not
at all called.

Can any body tell how I can solve this problem.

Please help.

Thanks,
Sundar


Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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