SetupDiGetHwProfileFriendlyNameExA function

The SetupDiGetHwProfileFriendlyNameEx function retrieves the friendly name associated with a hardware profile ID on a local or remote computer.

Syntax

WINSETUPAPI BOOL SetupDiGetHwProfileFriendlyNameExA(
  DWORD  HwProfile,
  PSTR   FriendlyName,
  DWORD  FriendlyNameSize,
  PDWORD RequiredSize,
  PCSTR  MachineName,
  PVOID  Reserved
);

Parameters

HwProfile

Supplies 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 character buffer to receive the friendly name.

FriendlyNameSize

The size, in characters, of the FriendlyName buffer.

RequiredSize

A pointer to a variable to receive the number of characters required to store the friendly name (including a NULL terminator). This parameter is optional and can be NULL.

MachineName

A pointer to NULL-terminated string that contains the name of a remote computer on which the hardware profile ID resides. This parameter is optional and can be NULL. If MachineName is NULL, the hardware profile ID is on the local computer.

Reserved

Must 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.

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

SetupDiGetHwProfileFriendlyName

SetupDiGetHwProfileListEx