The SetupDiClassNameFromGuid function retrieves the class name associated with a class GUID.
WINSETUPAPI BOOL SetupDiClassNameFromGuidA( CONST GUID *ClassGuid, PSTR ClassName, DWORD ClassNameSize, PDWORD RequiredSize );
A pointer to the class GUID for the class name to retrieve.
A pointer to a buffer that receives the NULL-terminated string that contains the name of the class that is specified by the pointer in the ClassGuid parameter.
The size, in characters, of the buffer that is pointed to by the ClassName parameter. The maximum size, in characters, of a NULL-terminated class name is MAX_CLASS_NAME_LEN. For more information about the class name size, see the following Remarks section.
A pointer to a variable that receives the number of characters that are required to store the requested NULL-terminated class name. This pointer 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 with a call to GetLastError.
Call SetupDiClassNameFromGuidEx to retrieve the name for a class on a remote computer.
SetupDiClassNameFromGuid does not enforce a restriction on the length of the class name that it can return. This function returns the required size for a NULL-terminated class name even if it is greater than MAX_CLASS_NAME_LEN. However, MAX_CLASS_NAME_LEN is the maximum length of a valid NULL-terminated class name. A caller should never need a buffer that is larger than MAX_CLASS_NAME_LEN. For more information about class names, see the description of the Class entry of an INF Version section.
|Windows version||Available in Microsoft Windows 2000 and later versions of Windows.|
|Header||setupapi.h (include Setupapi.h)|