DiGetClassDevsEx

RETERR DiGetClassDevsEx(LPLPDEVICE_INFO lplpdi, LPCSTR lpszClassName, LPSTR lpszEnumerator, HWND hwndParent, int iFlags)
 

Returns a list of DEVICE_INFO structs for all of the installed devices of a specified class.

lplpdi
Pointer to a pointer to a DEVICE_INFO struct. This pointer receives the pointer to the beginning of the list of DEVICE_INFO structs created by this function.
lpszClassName
If non-null, the class name to use when creating the list of devices.
lpszEnumerator
If specified this API will retrieve devices created by the specified enumerator. If NULL then this functions works like DiGetClassDevs. For example. this parameter could specify ROOT, and only device in the ENUM\ROOT branch would be returned.
hwndParent
If non-null, the window handle of the top level window use for any U/I using the resulting DEVICE_INFO structs.
iFlags
Control options for building the device list.
DIGCF_PRESENT Return only devices which are present. This flag is only valid if Config Manager is running and has created devnodes for the installed devices.
DIGCF_ALLCLASSES Return a list of installed devices for all classes. If set, this flags will cause lpszClassName to be ignored.
DIGCF_PROFILE Return only devices which are present in the current configuration.

This function build a list of device that have been previsouly installed. This function uses the HKLM\ENUM branch of the registry to build its list.

See Also

DiGetClassDevs