PeerCollabEnumContacts function (p2p.h)

The PeerCollabEnumContacts function returns a handle to an enumerated set that contains all of the peer collaboration network contacts currently available on the calling peer.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabEnumContacts(
  [out] HPEERENUM *phPeerEnum
);

Parameters

[out] phPeerEnum

Handle to an enumerated set that contains all of the peer collaboration network contacts currently available on the calling peer, excluding the "Me" contact.

Return value

Returns S_OK if the function succeeds. Otherwise, the function returns one of the following values.

Return code Description
E_OUTOFMEMORY
There is not enough memory to support this operation.
E_INVALIDARG
One of the arguments is invalid.
PEER_E_NOT_INITIALIZED
The Windows Peer infrastructure is not initialized. Calling the relevant initialization function is required.

Remarks

To obtain the individual peer contacts, pass the returned handle to PEER_CONTACT structures will be returned. To close the enumeration and release the resources associated with it, pass this handle to PeerEndEnumeration. Individual items returned by the enumeration must be released with PeerFreeData.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also

Peer Collaboration API Functions