The SetupDiGetClassDescriptionEx function retrieves the description of a setup class installed on a local or remote computer.
BOOL SetupDiGetClassDescriptionEx( _In_ const GUID *ClassGuid, _Out_ PTSTR ClassDescription, _In_ DWORD ClassDescriptionSize, _Out_opt_ PDWORD RequiredSize, _In_opt_ PCTSTR MachineName, _Reserved_ PVOID Reserved );
- ClassGuid [in]
A pointer to the GUID for the setup class whose description is to be retrieved.
- ClassDescription [out]
A pointer to a character buffer that receives the class description.
- ClassDescriptionSize [in]
The size, in characters, of the buffer that is pointed to by the ClassDescription parameter. The maximum length, in characters, of a NULL-terminated class description is LINE_LEN. For more information, see the following Remarks section.
- RequiredSize [out, optional]
A pointer to a DWORD-typed variable that receives the size, in characters, that is required to store the requested NULL-terminated class description. This pointer is optional and can be NULL.
- MachineName [in, optional]
A pointer to a NULL-terminated string that supplies the name of a remote computer on which the setup class resides. This pointer is optional and can be NULL. If the class is installed on a local computer, set the pointer to NULL.
Reserved for system use. A caller of this function must set this parameter to 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.
If there is a friendly name in the registry key for the class, this routine returns the friendly name. Otherwise, this routine returns the class name.
SetupDiGetClassDescriptionEx does not enforce a restriction on the length of the class description that it can return. This function returns the required size for a NULL-terminated class description even if it is greater than LINE_LEN. However, LINE_LEN is the maximum length of a valid NULL-terminated class description. A caller should never need a buffer that is larger than LINE_LEN.
|Available in Microsoft Windows 2000 and later versions of Windows.|
Build date: 2/13/2014