SetupDiGetHwProfileFriendlyNameA function

The SetupDiGetHwProfileFriendlyName function retrieves the friendly name associated with a hardware profile ID.

Syntax

WINSETUPAPI BOOL SetupDiGetHwProfileFriendlyNameA(
  DWORD  HwProfile,
  PSTR   FriendlyName,
  DWORD  FriendlyNameSize,
  PDWORD RequiredSize
);

Parameters

HwProfile

The hardware profile ID associated with the friendly name to retrieve. If this parameter is 0, the friendly name for the current hardware profile is retrieved.

FriendlyName

A pointer to a string buffer to receive the friendly name.

FriendlyNameSize

The size, in characters, of the FriendlyName buffer.

RequiredSize

A pointer to a variable of type DWORD that receives the number of characters required to retrieve the friendly name (including a NULL terminator).

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 SetupDiGetHwProfileFriendlyNameEx to get the friendly name of a hardware profile ID on a remote computer.

Requirements

   
Windows version Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header setupapi.h (include Setupapi.h)
Library Setupapi.lib

See Also

SetupDiGetHwProfileFriendlyNameEx

SetupDiGetHwProfileList