Windows Media Format SDK banner art
PreviousNext

IMDSPEnumStorage::Next

The Next method returns a pointer to the next celt IMDSPStorage interfaces.

Syntax

HRESULT Next(
  ULONG  celt,
  IMDSPStorage**  ppStorage,
  ULONG*  pceltFetched
);

Parameters

  celt

[in]  Number of storage interfaces requested.

  ppStorage

[out]  Array of pointers to the number of IMDSPStorage interfaces specified in celt. If NULL is returned, no more storages 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 number of interfaces returned.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
S_FALSE Number of interfaces retrieved is fewer than requested.
E_FAIL An unspecified error occurred.

Remarks

When there are no more storage interfaces, or when there are fewer storage interfaces than requested, 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.

The Windows NT 4.0 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 ppStorage.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.