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.
What's SetupDi equivalent to CM_Query_Remove_SubTree?

DDK document notes that use SetupDi function for many CM
functions. I think it should tell us what's the SetupDi equivalent
to those CM functions.

Best Regards

Jackal Huang

Re: What's SetupDi equivalent to CM_Query_Remove_SubTree? by Kirk

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



Re: What's SetupDi equivalent to CM_Query_Remove_SubTree? by Gary

Gary
Tue Dec 09 23:34:06 CST 2003


"Kirk Ferdmann" <kirk_ferdmann@nospam.hotmail.com> wrote in message
news:nvydneWcMawTMUui4p2dnA@comcast.com...
>
> Gary,
>
> It appears that MSDN prescribes CM_Query_Remove_SubTree over
> CM_Request_Device_Eject when your device does not support surprise
removal.

Thanks!

--

-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
-gchanson@mvps.org

-Abolish public schools