Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.88 KB

CM_Get_Child_Ex.md

File metadata and controls

66 lines (45 loc) · 1.88 KB

Home

Function name : CM_Get_Child_Ex

Group: PnP Configuration Manager - Library: cfgmgr32


The function is used to retrieve a device instance handle to the first child node of a specified device node, in a local or a remote machine"s device tree.


Code examples:

Enumerating devices installed on the local machine
Disconnecting USB Mass Storage Device programmatically

Declaration:

CMAPI CONFIGRET WINAPI CM_Get_Child_Ex(
	OUT PDEVINST pdnDevInst,
	IN DEVINST dnDevInst,
	IN ULONG ulFlags,
	IN HMACHINE  hMachine
);  

FoxPro declaration:

DECLARE INTEGER CM_Get_Child_Ex IN cfgmgr32;
	INTEGER @pdnDevInst,;
	INTEGER DevInst,;
	LONG ulFlags,;
	INTEGER hMachine  

Parameters:

pdnDevInst Caller-supplied pointer to the device instance handle to the child node that this function retrieves. The retrieved handle is bound to the machine handle supplied by hMachine.

dnDevInst Caller-supplied device instance handle that is bound to the machine handle supplied by hMachine.

ulFlags Not used, must be zero.

hMachine Caller-supplied machine handle to which the caller-supplied device instance handle is bound.


Return value:

If the operation succeeds, the function returns CR_SUCCESS (0).


Comments:

The CM_Get_Child_Ex and the CM_Get_Sibling_Ex calls make possible to enumerate all device nodes in the device tree for a machine specified by the mean of CM_Connect_Machine call.

See also: CM_Connect_Machine, CM_Locate_DevNode_Ex, CM_Get_Sibling_Ex.