Re: surpriseremove test error by Mark
Mark
Sat Aug 02 09:06:35 CDT 2003
On Sat, 2 Aug 2003 00:48:58 -0700, "steven" <stevenl2003@hotmail.com>
wrote:
>
>>-----Original Message-----
>>My driver is for usb device. I try to test
>>surpriseremove. HCT simulates unpluging device. My
>driver
>>steps into PnpSurpriseRemove, PnpRemove and Unload
>>routine. Whwn HCT try to "insert" device, the device
>>manager shows :"Windows cannot load the device driver
>for
>>this hardware because a previous instance of the device
>>driver is still in memory. (Code 38)". Why?
>>I've never seen this error when using this driver before.
>>
>>.
>>
>
>After I restart computer and restart HCT, every thing is
>OK! But it's not acceptable. It must work normally on the
>first run of HCT. Help me!
It sounds like you have not deallocated all referenced resources. You
should run driver verifier while you are executing this test, as it
may uncover the problem for you. Otherwise you need to use your system
debugger to probe the state of all device objects, devnodes, irps,
etc. associated with your driver and device object.
=====================
Mark Roddy
Windows XP/2000/NT Consulting, Microsoft DDK MVP
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
For Windows Device Driver Training: see www.azius.com