Share via


PeerGetNextItem (Windows CE 5.0)

Send Feedback

This function retrieves a specific number of items from a peer enumeration.

HRESULT WINAPI PeerGetNextItem(  HPEERENUM hPeerEnum,  PULONG pCount,  PVOID* ppvItems);

Parameters

  • hPeerEnum
    [in] Handle to the peer enumeration from which items are retrieved. This handle is generated by a peer enumeration function.
  • pCount
    [in, out] Pointer to an integer that specifies the number of items to be retrieved from the peer enumeration. When returned, it contains the number of items actually present in ppvItems. This parameter cannot be NULL.
  • ppvItems
    [out] Receives a pointer to an array of pointers to the next pCount items in the peer enumeration. The actual data, for example, a record or member information block, depends on the actual peer enumeration type.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function call succeeded.
E_INVALIDARG One of the parameters is not valid.
E_OUTOFMEMORY There is not enough memory to perform the specified operation.

Remarks

This method returns a number of items equal to or less than the amount specified in pCount. It returns a list of items less than the amount specified when that amount is greater than the number of items available. For example, when the inbound value of pCount is 10 and the remainder of the enumeration is 5 items in length, only 5 items are returned and the value pointed to by pCount is set to 5.

The end of an enumeration is reached when the function returns with the pCount parameter set to zero (0).

All items returned must be freed by passing a pointer to the array of pointers to the PeerFreeData function.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: p2p.h.
Link Library: p2p.lib.

See Also

Peer-to-Peer Common Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.