kandukondein
August 4th, 2004, 01:18 PM
Is there any way a Driver an Automatically unload it self.
Say in DriverEntry we can have a condition checked and if its true the driver unloads itself. Is it Possible?
Regards
Kandukondein
Mick
August 5th, 2004, 10:54 AM
What kind of driver are you developing?
Do you have a DriverUnload routine?
You can return from DriverEntry(...) after cleaning up any resources you have allocated with a failure status. The I/O manager will cleanup anything it allocated in an attempt load your driver. This of course does not unload your current driver, nor call your unload routine if you have one.
This is covered in the DDK documentation under the DriverEntry(...) (requried/optional Responsibilities) and discussions on DriverUnload(...)