DiGetClassDevs

RETERR DiGetClassDevs(LPLPDEVICE_INFO lplpdi, LPCSTR lpszClassName, 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.
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

DiGetClassDevsEx