I run into this error only under HCT (WHQL).

But the interesting point is that
1) I handle IRP_MN_REMOVE_DEVICE successfully.
2) When my Unload gets called, !drvobj shows
that the driver object owns no devices.

But even after my Unload routine exits, !drivers
shows that the module is still loaded.

What could keep a module from unloading after return
from driver unload?


regards,

m navab

Re: CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD by Eliyas

Eliyas
Tue Jul 01 12:45:37 CDT 2003

> What could keep a module from unloading after return
> from driver unload?
>

Outstanding reference to the DriverObject object. There is a section in the
Windbg docs that describes ""Debugging a Failed Driver Unload". Follow that.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx