The SetupDiGetHwProfileList function retrieves a list of all currently defined hardware profile IDs.
WINSETUPAPI BOOL SetupDiGetHwProfileList( PDWORD HwProfileList, DWORD HwProfileListSize, PDWORD RequiredSize, PDWORD CurrentlyActiveIndex );
A pointer to an array to receive the list of currently defined hardware profile IDs.
The number of DWORDs in the HwProfileList buffer.
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.
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.
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.
Call SetupDiGetHwProfileListEx to retrieve the hardware profile IDs for a remote computer.
|Windows version||Available in Microsoft Windows 2000 and later versions of Windows.|
|Header||setupapi.h (include Setupapi.h)|