Compartilhar via


PeerEnumGroups (Windows CE 5.0)

Send Feedback

This function creates and returns a peer enumeration handle that is used to enumerate all the peer-to-peer groups associated with a specific peer identity.

HRESULT WINAPI PeerEnumGroups(  PCWSTR pwzIdentity,  HPEERENUM* phPeerEnum);

Parameters

  • pwzIdentity
    [in] Specifies the peer identity to enumerate groups for.
  • phPeerEnum
    [out] Receives a handle to the peer enumeration that contains the list of peer-to-peer groups that the specified identity is a member of, with each item represented as a pointer to a PEER_NAME_PAIR_TAG structure. Pass this handle to PeerGetNextItem to retrieve the items. When it is finished, call PeerEndEnumeration release the memory.

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.
PEER_E_NOT_FOUND The specified peer identity cannot be found.

Remarks

Once the application has obtained the enumeration handle, use PeerGetNextItem and PeerGetItemCount to enumerate the peer-to-peer groups.

When it enumerates peer-to-peer groups, PeerGetNextItem returns an array of pointers to PEER_NAME_PAIR structures.

Call PeerEndEnumeration to free the peer enumeration handle when it is no longer required.

Requirements

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

See Also

Identity Manager Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.