Problems running PnP Driver Test Tool


I’m developing a driver for Windows 2000 and Windows XP. At the moment
I’m doing most of my development in Windows XP. The driver that I’m
developing is a bus driver with a couple of child devices. The bus
driver HW is attached to PCMCIA bus. I have tried using PnP Driver test
tool to check my device driver using both “Test Removal” and “Test
Rebalance” tests from the testkit.

What happens, for example in the first test, is that device gets removed
OK (first child devices and then bus driver gets unload) but Windows
fails to reload the bus driver, even if I physical remove the card and
reinsert it. The error I’m getting in Device Manager is "Windows
successfully loaded the device driver for this hardware but cannot find
the hardware device. (Code 41). The status from system’s debug tracing
gives me error STATUS_PLUGPLAY_NO_DEVICE (0xC000025EL). Only way to get
my device operational after this is to reinstall it using update driver
and pointing to the original inf-files.

Would anyone happen to know what’s going on here and what would be a
good place to start looking for fix to this problem? Any ideas about the
issue are very much appreciated.

BR, Mikko