Kirk
Tue Dec 09 23:18:06 CST 2003
"Jackal Huang" <huangjj@hotmail.com> wrote in message
news:%23gaHv3svDHA.1744@TK2MSFTNGP12.phx.gbl...
> I would query whether the usb device can be safely removed.
> CM_Query_Remove_SubTree should be able to do this.
> DDK document suggests use SetupDi API instead.
Jackal,
Are you using an installed version of MSDN? I just notice a problem with
mine (June 2003) - when I type CM_Query_Remove_SubTree on the index tab it
shows the correct article. OTOH if I navigate the contents tree it shows the
stub article that says - "don't use this function..."
The online copy of MSDN says the same thing as the index version
(
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh
/install/cfgmgrfn_55v6.asp) so I assume it's the correct one. But ultimately
only MS guys can confirm this.
I believe that SetupDi and CM APIs have different purpose in life and every
functionality in CM API found its way into SetupDi.
Gary,
It appears that MSDN prescribes CM_Query_Remove_SubTree over
CM_Request_Device_Eject when your device does not support surprise removal.
-Kirk