Platform SDK: Hardware

SetupDiCreateDeviceInfoList

The SetupDiCreateDeviceInfoList function creates an empty device information set. This set can be associated with a class GUID.

To create a device information set for a remote computer, call the SetupDiCreateDeviceInfoListEx function.

HDEVINFO SetupDiCreateDeviceInfoList(
  CONST LPGUID ClassGuid, 
  HWND hwndParent 
);

Parameters

ClassGuid
[in] Optionally specifies the GUID of the setup class associated with this device information set. If this parameter is specified, only devices of this class can be included in this device information set.
hwndParent
[in] Optionally specifies a handle to the top-level window in which to display a user interface.

Return Values

If the function succeeds, the return value is a handle to an empty device information set.

If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.

Remarks

To destroy the device information set when you have finished, call the SetupDiDestroyDeviceInfoList function.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in Setupapi.h.
  Library: Use Setupapi.lib.

See Also

Device Management Overview, Device Management Functions, SetupDiCreateDeviceInfoListEx, SetupDiDestroyDeviceInfoList