SetupDiClassNameFromGuidExA function

The SetupDiClassNameFromGuidEx function retrieves the class name associated with a class GUID. The class can be installed on a local or remote computer.

Syntax

WINSETUPAPI BOOL SetupDiClassNameFromGuidExA(
  CONST GUID *ClassGuid,
  PSTR       ClassName,
  DWORD      ClassNameSize,
  PDWORD     RequiredSize,
  PCSTR      MachineName,
  PVOID      Reserved
);

Parameters

ClassGuid

The class GUID of the class name to retrieve.

ClassName

A pointer to a string buffer that receives the NULL-terminated name of the class for the specified GUID.

ClassNameSize

The size, in characters, of the ClassName buffer.

RequiredSize

The number of characters required to store the class name (including a terminating null). RequiredSize is always less than MAX_CLASS_NAME_LEN.

MachineName

A pointer to a NULL-terminated string that contains the name of a remote system on which the class is installed. This parameter is optional and can be NULL. If MachineName is NULL, the local system name is used.

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 with 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

SetupDiClassGuidsFromNameEx

SetupDiClassNameFromGuid