SetupDiClassGuidsFromName

The 
SetupDiClassGuidsFromName function retrieves the GUID(s) associated with the specified class name. This list is built based on the classes currently installed on the system.

Syntax

BOOL SetupDiClassGuidsFromName(
  __in   PCTSTR ClassName,
  __out  LPGUID ClassGuidList,
  __in   DWORD ClassGuidListSize,
  __out  PDWORD RequiredSize
);

Parameters


ClassName [in]
The name of the class for which to retrieve the class GUID.
ClassGuidList [out]
A pointer to an array to receive the list of GUIDs associated with the specified class name.
ClassGuidListSize [in]
The number of GUIDs in the 
ClassGuidList array.
RequiredSize [out]
Supplies a pointer to a variable that receives the number of GUIDs associated with the class name. If this number is greater than the size of the
ClassGuidList buffer, the number indicates how large the array must be in order to store all the GUIDs.

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 
SetupDiClassGuidsFromNameEx to retrieve the class GUIDs for a class on a remote computer.

Requirements


Version
Available in Microsoft Windows 2000 and later versions of Windows.
Header
Setupapi.h (include Setupapi.h)
Library
Contained in Setupapi.lib. Link to Setupapi.lib.

좋은 웹페이지 즐겨찾기