CM_Reenumerate_DevNode ?

Hi all,

I am using SetupDixxx API to remove and re-enumerate my disk devices (that I am filtering as upperfilter). Something like this:

/*++

SP_DEVINFO_DATA pdevinfo;
DEVINST devInst;

status = CM_Get_Parent(&devInst, pdevinfo.DevInst, 0);

SetupDiRemoveDevice( info, &pdevinfo ); (1)

CM_Reenumerate_DevNode(devInst, 0); (2)

–*/

When (1) is executing, using WinDbg, I can see the QUERY_REMOVE_DEVICE and REMOVE_DEVICE Irps coming down the device stack (1).
When (2) is executing, I see START_DEVICE Irp too. My device is then started as expected.
But for some reason, right after start device time, I see more Irps coming down, namely QUERY_REMOVE_DEVICE, REMOVE_DEVICE, and START_DEVICE. Looks like PnP is trying to do the remove/start one more time.

Does anyone have any idea?

Thanks

Peter Trinh