IEnumConnections::Next method

Retrieves the specified number of items in the enumeration sequence.

Syntax


HRESULT Next(
  [in]  ULONG       cConnections,
  [out] CONNECTDATA *rgcd,
  [out] ULONG       *lpcFetched
);

Parameters

cConnections [in]

The number of items to be retrieved. If there are fewer than the requested number of items left in the sequence, this method retrieves the remaining elements.

rgcd [out]

An array of enumerated items.

The enumerator is responsible for allocating any memory, and the caller is responsible for freeing it. If celt is greater than 1, the caller must also pass a non-NULL pointer passed to pceltFetched to know how many pointers to release.

lpcFetched [out]

The number of items that were retrieved. This parameter is always less than or equal to the number of items requested.

Return value

If the method retrieves the number of items requested, the return value is S_OK. Otherwise, it is S_FALSE.

Remarks

After this method returns successfully, the caller is responsible for calling Release (see the pUnk member of CONNECTDATA) for each element in the array. If cConnections is greater than one, the caller must also pass a non-NULL pointer to lpcFetched to get the number of pointers it has to be released.

E_NOTIMPL is not allowed as a return value. If an error value is returned, no entries in the array are valid on exit, and therefore no release is required.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IEnumConnections is defined as B196B287-BAB4-101A-B69C-00AA00341D07

See also

CONNECTDATA
IEnumConnections

 

 

Show: