SetupDiGetHwProfileFriendlyNameA function (setupapi.h)
The SetupDiGetHwProfileFriendlyName function retrieves the friendly name associated with a hardware profile ID.
Syntax
WINSETUPAPI BOOL SetupDiGetHwProfileFriendlyNameA(
[in] DWORD HwProfile,
[out] PSTR FriendlyName,
[in] DWORD FriendlyNameSize,
[out, optional] PDWORD RequiredSize
);
Parameters
[in] 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.
[out] FriendlyName
A pointer to a string buffer to receive the friendly name.
[in] FriendlyNameSize
The size, in characters, of the FriendlyName buffer.
[out, optional] 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.
Note
The setupapi.h header defines SetupDiGetHwProfileFriendlyName as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Microsoft Windows 2000 and later versions of Windows. |
Target Platform | Desktop |
Header | setupapi.h (include Setupapi.h) |
Library | Setupapi.lib |