Previous | Next |
The Next method retrieves a pointer to the next celt IMDSPDevice interfaces.
Syntax
HRESULT Next(
ULONG celt,
IMDSPDevice** ppDevice,
ULONG* pceltFetched
);
Parameters
celt
[in] Number of devices requested.
ppDevice
[out] Array of pointers to the number of IMDSPDevice interfaces specified in celt. If NULL is returned, no more devices exist, or an error has occurred. If celt is more than 1, the caller must allocate enough memory to store celt number of interface pointers.
pceltFetched
[out] Pointer to a ULONG variable that receives the count of the actual number of interfaces retrieved.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
S_FALSE | The number of elements retrieved is less than celt. |
E_FAIL | An unspecified error occurred. |
Remarks
When there are no more Media Device Service Provider interfaces, or when there are fewer of these interfaces than requested by the celt parameter, the return value from Next is S_FALSE. When this happens, the pceltFetched parameter must be queried to determine how many interfaces, if any, were returned.
Version 4.0 of the Windows NT operating system cannot detect when a user physically disconnects a device. Therefore, when a device is disconnected, the Next method does not return zero in pceltFetched or NULL in ppDevice.
See Also
Previous | Next |