SetupDiEnumDeviceInfo

BOOLEAN
    SetupDiEnumDeviceInfo(
        IN HDEVINFO  DeviceInfoSet,
        IN DWORD  MemberIndex,
        OUT PSP_DEVINFO_DATA  DeviceInfoData
        );

SetupDiEnumDeviceInfo enumerates the members of the specified device information set.

Parameters
DeviceInfoSet
Supplies a handle to the device information set.
MemberIndex
Supplies the 0-based index of the device information member to retrieve.
DeviceInfoData
Supplies a pointer to an SP_DEVINFO_DATA structure to receive information about this member.
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 device information members, an installer should initially call SetupDiEnumDeviceInfo with the MemberIndex parameter set to 0. The installer should then increment MemberIndex and call SetupDiEnumDeviceInfo until there are no more values (the function fails and a call to GetLastError returns ERROR_NO_MORE_ITEMS).

See Also

SetupDiCreateDeviceInfo, SetupDiDeleteDeviceInfo, SetupDiEnumDeviceInfo, SetupDiOpenDeviceInfo