The SetupDiCreateDeviceInfoList function creates an empty device information set. This set can be associated with a class GUID.
HDEVINFO
SetupDiCreateDeviceInfoList(
IN LPGUID ClassGuid, OPTIONAL
IN HWND hwndParent OPTIONAL
);
The function returns a handle to an empty device information set if it is successful. Otherwise, it returns INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
Declared in setupapi.h. Include setupapi.h.
The caller of this function must delete the returned device information set when it is no longer needed by calling SetupDiDestroyDeviceInfoList.
To create a device information list for a remote machine use SetupDiCreateDeviceInfoListEx.
SetupDiCreateDeviceInfoListEx, SetupDiGetClassDevs, SetupDiDestroyDeviceInfoList, SetupDiGetDeviceInfoListClass