次の方法で共有


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.

Comments

  • Anonymous
    June 01, 2006
    Did you add this to the DDK documentation?
  • Anonymous
    June 01, 2006
    Good point.  I did not file a bug for this.  I will do so tomorrow.  You are also free to file a bug, you can use the "Send Feedback on this topic" link at the bottom of a DDK topic page (I would suggest using the IoRequestDeviceEject page for lack of a better topic).