SetupDiBuildClassInfoList function (setupapi.h)

The SetupDiBuildClassInfoList function returns a list of setup class GUIDs that identify the classes that are installed on a local computer.

Syntax

WINSETUPAPI BOOL SetupDiBuildClassInfoList(
  [in]            DWORD  Flags,
  [out, optional] LPGUID ClassGuidList,
  [in]            DWORD  ClassGuidListSize,
  [out]           PDWORD RequiredSize
);

Parameters

[in] Flags

Flags used to control exclusion of classes from the list. If no flags are specified, all setup classes are included in the list. Can be a combination of the following values:

DIBCI_NOINSTALLCLASS

Exclude a class if it has the NoInstallClass value entry in its registry key.

DIBCI_NODISPLAYCLASS

Exclude a class if it has the NoDisplayClass value entry in its registry key.

[out, optional] ClassGuidList

A pointer to a GUID-typed array that receives a list of setup class GUIDs. This pointer is optional and can be NULL.

[in] ClassGuidListSize

The number of GUIDs in the array that is pointed to by the ClassGuildList parameter. If ClassGuidList is NULL, ClassGuidSize must be zero.

[out] RequiredSize

A pointer to a DWORD-typed variable that receives the number of GUIDs that are returned (if the number is less than or equal to the size, in GUIDs, of the array that is pointed to by the ClassGuidList parameter).

If this number is greater than the size of the ClassGuidList array, it indicates how large the ClassGuidList array must be in order to contain all the class 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

To retrieve the number of classes that are installed on a local computer, call SetupDiBuildClassInfoList with ClassGuidList set to NULL and ClassGuidSize set to zero. In response to such a call, the function returns the number of classes in *RequiredSize.

SetupDiBuildClassInfoList does not return a class GUID for a class if the NoUseClass value entry exists in the registry key of the class.

To retrieve the list of setup class GUIDs installed on a remote system use SetupDiBuildClassInfoListEx.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header setupapi.h (include Setupapi.h)
Library Setupapi.lib
DLL Setupapi.dll

See also

SetupDiBuildClassInfoListEx

SetupDiGetClassDescription

SetupDiGetINFClass