IVIO_EnumDevices::Next

This method retrieves the specified number of device class identifiers (CLSIDs) in the enumeration sequence.

Syntax

HRESULT IVIO_EnumDevices::Next ( ULONG cDevices, LPCLSID *rgDevicesArray, ULONG *pcDevicesFetched);

Parameters

cDevices,
[in] Number of device CLSIDs to retrieve.
rgDevicesArray
[out] Pointer to the array of CLSID pointers where retrieved device CLSIDs are stored.
pcDevicesFetched
[out] Pointer to a ULONG that contains the number of elements actually returned. If cDevices is 1, this parameter can be NULL. If cDevices is greater than 1, this parameter must be a valid pointer.

Return Values

One of the values described in the following table is returned.

Value
Description
S_OK The application successfully retrieved the number of device CLSIDs specified in cDevices. The value referenced by pcDevicesFetched is set to cDevices.
S_FALSE The application returned fewer CLSIDs than specified in cDevices. The value referenced by pcDevicesFetched is set to the number of elements returned. The members of rgDevicesArray that were not set are set to NULL.
E_OUTOFMEMORY The application is out of memory.
E_UNEXPECTED An unexpected error occurred.
E_INVALIDARG The value of cDevices is invalid, or pcDevicesFetched is NULL and cDevices is greater than 1.
E_POINTER Either the rgDevicesArray pointer is invalid or the pcDevicesFetched pointer is invalid.

Remarks

The application must free each array element using the CoTaskMemFree call.