PeerCollabEnumPeopleNearMe function (p2p.h)

The PeerCollabEnumPeopleNearMe function returns a handle to an enumerated set that contains all of the peer collaboration network "people near me" endpoints currently available on the subnet of the calling peer.

Syntax

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

Parameters

[out] phPeerEnum

Pointer to a handle of an enumerated set that contains all of the peer collaboration network "people near me" endpoints currently available on the subnet of the calling peer.

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.
PEER_E_NOT_SIGNED_IN
The operation requires the user to be signed in.

Remarks

To obtain the individual peer "people near me" contacts, pass the returned handle to PeerGetNextItem. An array of pointers to the PEER_PEOPLE_NEAR_ME structures are 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_PEOPLE_NEAR_ME

Peer Collaboration API Functions

PeerCollabSignin