Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 4.01 KB

nf-setupapi-setupdiclassnamefromguida.md

File metadata and controls

98 lines (70 loc) · 4.01 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:setupapi.SetupDiClassNameFromGuidA
SetupDiClassNameFromGuidA function (setupapi.h)
The SetupDiClassNameFromGuid function retrieves the class name associated with a class GUID. (ANSI)
SetupDiClassNameFromGuidA
di-rtns_b17476f2-25e2-48ed-be4d-53af55541056.xml
devinst\setupdiclassnamefromguid.htm
devinst
e23631b4-eb7f-4a75-ac23-25d3d974a3e3
12/05/2018
SetupDiClassNameFromGuid, SetupDiClassNameFromGuid function [Device and Driver Installation], SetupDiClassNameFromGuidA, SetupDiClassNameFromGuidW, devinst.setupdiclassnamefromguid, di-rtns_b17476f2-25e2-48ed-be4d-53af55541056.xml, setupapi/SetupDiClassNameFromGuid
setupapi.h
Setupapi.h
Desktop
Available in Microsoft Windows 2000 and later versions of Windows.
Setupapi.lib
Windows
19H1
SetupDiClassNameFromGuidA
setupapi/SetupDiClassNameFromGuidA
c++
APIRef
kbSyntax
LibDef
Setupapi.lib
Setupapi.dll
SetupDiClassNameFromGuid
SetupDiClassNameFromGuidA

SetupDiClassNameFromGuidA function

-description

The SetupDiClassNameFromGuid function retrieves the class name associated with a class GUID.

-parameters

-param ClassGuid [in]

A pointer to the class GUID for the class name to retrieve.

-param ClassName [out]

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.

-param ClassNameSize [in]

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.

-param RequiredSize [out, optional]

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.

-returns

The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved with a call to GetLastError.

-remarks

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.

Note

The setupapi.h header defines SetupDiClassNameFromGuid 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.

-see-also

SetupDiClassGuidsFromName

SetupDiClassNameFromGuidEx