This method retrieves the specified number of device class identifiers (CLSIDs) in the enumeration sequence.
HRESULT IVIO_EnumDevices::Next ( ULONG cDevices, LPCLSID *rgDevicesArray, ULONG *pcDevicesFetched);
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. |
The application must free each array element using the CoTaskMemFree call.