RE: [ntdev]WinDbg in Win2000

> Another question: When I debug my USB driver, I unplug my USB

device and the
driver only receives IRP_MN_SURPRISE_REMOVE irp, no IRP_MN_REMOVE_DEVICE
follows. I returns STATUS_SUCCESS in IRP_MN_SURPRISE_REMOVE irp. What’s
wrong?

If I take this literally then you are doing the wrong thing. Set
Irp->IoStatus->Status to STATUS_SUCCESS (why?), pass the Irp down the stack
and return whatever IoCallDriver returns. Do not complete the IRP in your
function driver. If the bus driver doesn’t see the IRP then I’m guessing
that is why you never see the IRP_MN_REMOVE.

**********
Actually I tried both, setting Irp->IoStatus->Status to STATUS_SUCCESS or
just passing down the IRP. If I passed down the IRP, the lower level driver
would return status 0xc00000bb (not handled).

One more question:
If I don’t unplug my USB adapter from the port and shut down the system, I
get the following error message:
“Module Unloaded: KMIXR.sys
Module Unloded: SRV.sys
LSA AU: DeregisterLogonProcessFailed 0x80090305
Fatal System Error: 0x0000009f”

Note: 0x80090305 : SEC_E_SECPKG_NOT_FOUND (The requested security package
does not found)
0x0000009f : DRIVER_POWER_STATE_ERROR

What could be the problem?

Thanks

James