PeerGetNextItem function (p2p.h)
The PeerGetNextItem function returns a specific number of items from a peer enumeration.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGetNextItem(
[in] HPEERENUM hPeerEnum,
[in, out] ULONG *pCount,
[out] PVOID **pppvItems
);
Parameters
[in] hPeerEnum
Handle to the peer enumeration from which items are retrieved. This handle is generated by a peer enumeration function.
[in, out] pCount
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 in ppvItems. This parameter cannot be NULL.
[out] pppvItems
Receives a pointer to an array of pointers to the next pCount items in the peer enumeration. The data, for example, a record or member information block, depends on the actual peer enumeration type.
Return value
Returns S_OK if the operation succeeds. Otherwise, the function returns one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
There is not enough memory to perform a specified operation. |
Remarks
The PeerGetNextItem function returns the following:
- Items that are equal to or less than the amount specified in pCount.
- A list of items that are less than the amount specified when the amount is greater than the number of items available.
The end of an enumeration is indicated when the function returns with the pCount parameter set to zero (0).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP |
Minimum supported server | None supported |
Target Platform | Windows |
Header | p2p.h |
Library | P2P.lib |
DLL | P2P.dll |