Previous Next

SetupDiCreateDeviceInfoList

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
    );

Parameters

ClassGuid
Optionally supplies the GUID of the setup class associated with this device information set. If this parameter is specified, only devices of this class may be included in this device information set.
hwndParent
Optionally supplies the window handle of the top-level window to use for any user interface related to non-device-specific actions (such as a select-device dialog using the global class driver list).

Return Value

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.

Headers

Declared in setupapi.h. Include setupapi.h.

Comments

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.

See Also

SetupDiCreateDeviceInfoListEx, SetupDiGetClassDevs, SetupDiDestroyDeviceInfoList, SetupDiGetDeviceInfoListClass