CONFIGRET CONFIGMG_Query_Remove_SubTree(DEVNODE dnAncestor, ULONG ulFlags)
Checks whether a device node and its progeny can be removed.
dnAncestor
The root of the subtree whose removal is being queried.
ulFlags
Must be zero.
If the hardware can only detect removal, the enumerator should call CONFIGMG_Remove_SubTree; this is problematic, because it does not give applications the opportunity to close their files. If the hardware has an indication that the user wants to remove it (that is, if it is software-eject capable), the enumerator should follow the steps shown in this example:
if (CM_Query_Remove_Subtree(dnDevNode, 0)==CR_SUCCESS) CM_Remove_SubTree(dnDevNode, 0);
See also CONFIGMG_Remove_Subtree