SetupDiGetHwProfileList function

The SetupDiGetHwProfileList function retrieves a list of all currently defined hardware profile IDs.

Syntax


BOOL SetupDiGetHwProfileList(
  _Out_     PDWORD HwProfileList,
  _In_      DWORD  HwProfileListSize,
  _Out_     PDWORD RequiredSize,
  _Out_opt_ PDWORD CurrentlyActiveIndex
);

Parameters

HwProfileList [out]

A pointer to an array to receive the list of currently defined hardware profile IDs.

HwProfileListSize [in]

The number of DWORDs in the HwProfileList buffer.

RequiredSize [out]

A pointer to a variable of type DWORD that receives the number of hardware profiles currently defined. If the number is larger than HwProfileListSize, the list is truncated to fit the array size. The value returned in RequiredSize indicates the array size required to store the entire list of hardware profiles. In this case, the function fails and a call to GetLastError returns ERROR_INSUFFICIENT_BUFFER.

CurrentlyActiveIndex [out, optional]

A pointer to a variable of type DWORD that receives the index of the currently active hardware profile in the retrieved hardware profile list. This parameter is optional and can be NULL.

Return value

The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved by making a call to GetLastError.

Remarks

Call SetupDiGetHwProfileListEx to retrieve the hardware profile IDs for a remote computer.

Requirements

Target platform

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

DLL

Setupapi.dll

See also

SetupDiCreateDevRegKey
SetupDiOpenDevRegKey

 

 

Send comments about this topic to Microsoft

Show: