OS differences when ejecting an unstarted PDO

One of the, errr, joys of owning the PnP state machine in KMDF is that I must be compatible with all the weird and wonderful behaviors of not only drivers, but the PnP manager itself. One such behavior was just fixed for the next release of KMDF (post v1.1).

On Windows XP and later releases, when you requested to eject a PDO which had not yet been started, the PDO would receive a IRP_MN_REMOVE_DEVICE PIRP and then a IRP_MN_EJECT_DEVICE PIRP. On Windows 2000, an unstarted PDO which is ejected only receives a IRP_MN_EJECT_DEVICE PIRP.

Sigh.

Of course, the DDK makes no mention of this difference. You can only find stuff like this out on your own. Thankfully, the fix was very easy to make. All I had to do was add a new transition between two existing states in the state machine and the problem was fixed with very little to no fear of regressing other parts of the PnP state machine.