IEnumDot11AdHocNetworks::Next method (adhoc.h)

Gets the specified number of elements from the sequence and advances the current position by the number of items retrieved. If there are fewer than the requested number of elements left in the sequence, it retrieves the remaining elements.

Syntax

HRESULT Next(
  [in]  ULONG              cElt,
  [out] IDot11AdHocNetwork **rgElt,
  [out] ULONG              *pcEltFetched
);

Parameters

[in] cElt

The number of elements requested.

[out] rgElt

A pointer to the first element in an array of IDot11AdHocNetwork interfaces. The array is of size cElt. The array must exist and be of size cElt (at a minimum) before the Next method is called, although the array need not be initialized. Upon return, the previously existing array will contain pointers to IDot11AdHocNetwork objects.

[out] pcEltFetched

A pointer to a variable that specifies the number of elements returned in rgElt.

Return value

Possible return values include, but are not limited to, the following.

Return code Description
S_OK
The method completed successfully.
E_FAIL
The method failed.
E_INVALIDARG
One of the parameters is invalid.
E_NOINTERFACE
A specified interface is not supported.
E_OUTOFMEMORY
The method could not allocate the memory required to perform this operation.
E_POINTER
A pointer passed as a parameter is not valid.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header adhoc.h

See also

IEnumDot11AdHocNetworks