Hi all,
I wrote my PnP driver. And I install/remove it via DevCon utility. I noticed in the debugger. When I remove my device, it successfully unloads from the system but when I restart the system, system again tries to call DriverUnload routine. I could not find it out why this happening. When I looked into the registry, I found that after removing the device via DevCon, some entries of the device are still present in the registry. Maybe this cause the system to call DriverUnload routine when the system is again started after rebooting it.
Could anyone put some light on it.
Thank you.
Hi all,
I wrote my PnP driver. And I install/remove it via DevCon utility. I
noticed in the debugger. When I remove my device, it successfully unloads
from the system but when I restart the system, system again tries to call
DriverUnload routine. I could not find it out why this happening. When I
looked into the registry, I found that after removing the device via DevCon,
some entries of the device are still present in the registry. Maybe this
cause the system to call DriverUnload routine when the system is again
started after rebooting it.
Could anyone put some light on it.
Thank you.
salman razzaq wrote:
Could anyone put some light on it.
Well, for DriverUnload to be called, it stands to reason that DriverLoad
will have been called first. I’d put a few more breakpoints in to see
what else gets called, and whether you succeed/fail any DriverLoad /
DeviceAdd calls.
MH.
Note that if you fail DriverEntry (e.g. return !NT_SUCCESS), DriverUnload is not called
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Martin Harvey
Sent: Tuesday, February 19, 2008 4:21 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] DriverUnload
salman razzaq wrote:
Could anyone put some light on it.
Well, for DriverUnload to be called, it stands to reason that DriverLoad
will have been called first. I’d put a few more breakpoints in to see
what else gets called, and whether you succeed/fail any DriverLoad /
DeviceAdd calls.
MH.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer