SetupDiEnumDriverInfo

BOOLEAN
    SetupDiEnumDriverInfo(
        IN HDEVINFO  DeviceInfoSet,
        IN PSP_DEVINFO_DATA  DeviceInfoData,    /* optional */
        IN DWORD  DriverType,
        IN DWORD  MemberIndex,
        OUT PSP_DRVINFO_DATA  DriverInfoData
        );

SetupDiEnumDriverInfo enumerates the members of a driver information list.

Parameters
DeviceInfoSet
Supplies a handle to the device information set containing a driver information list to enumerate.
DeviceInfoData
Supplies a pointer to an SP_DEVINFO_DATA structure that contains a driver information list to enumerate. If this parameter is not specified, the global driver list owned by the device information set is used (this list is of type SPDIT_CLASSDRIVER).
DriverType
Specifies what type of driver list to enumerate. Must be one of the following values:
SPDIT_CLASSDRIVER
Enumerate a class driver list.
SPDIT_COMPATDRIVER
Enumerate a list of compatible drivers for the specified device. DeviceInfoData must be specified if this flag is set.
MemberIndex
Supplies the 0-based index of the driver information member to retrieve.
DriverInfoData
Supplies a pointer to an SP_DRVINFO_DATA structure to receive information about the enumerated driver.
Return Value

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

Comments

To enumerate driver information set members, an installer should first call SetupDiEnumDriverInfo with the MemberIndex parameter set to 0. It should then increment MemberIndex and call SetupDiEnumDriverInfo until there are no more values. When there are no more values, the function fails and a call to GetLastError returns ERROR_NO_MORE_ITEMS.

See Also

SetupDiBuildDriverInfoList