SetupDiBuildClassInfoListExW function (setupapi.h)

The SetupDiBuildClassInfoListEx function returns a list of setup class GUIDs that includes every class installed on the local system or a remote system.

Syntax

WINSETUPAPI BOOL SetupDiBuildClassInfoListExW(
  [in]            DWORD  Flags,
  [out, optional] LPGUID ClassGuidList,
  [in]            DWORD  ClassGuidListSize,
  [out]           PDWORD RequiredSize,
  [in, optional]  PCWSTR MachineName,
                  PVOID  Reserved
);

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 buffer that receives a list of setup class GUIDs.

[in] ClassGuidListSize

Supplies the number of GUIDs in the ClassGuildList array.

[out] RequiredSize

A pointer to a variable that receives the number of GUIDs returned. If this number is greater than the size of the ClassGuidList, the number indicates how large the ClassGuidList array must be in order to contain the list.

[in, optional] MachineName

A pointer to a NULL-terminated string that contains the name of a remote computer from which to retrieve installed setup classes. This parameter is optional and can be NULL. If MachineName is NULL, this function builds a list of classes installed on the local computer.

Caution

Using this function to access remote machines is not supported beginning with Windows 8 and Windows Server 2012, as this functionality has been removed.

Reserved

Must be NULL.

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

Note

The setupapi.h header defines SetupDiBuildClassInfoListEx as an alias that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

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

See also

SetupDiBuildClassInfoList

SetupDiGetClassDescriptionEx