PeerCollabGetContact function (p2p.h)

The PeerCollabGetContact function obtains the information for a peer contact given the peer name of the contact.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabGetContact(
  [in, optional]  PCWSTR        pwzPeerName,
  [out, optional] PPEER_CONTACT *ppContact
);

Parameters

[in, optional] pwzPeerName

Pointer to zero-terminated Unicode string that contains the name of the peer contact for which to obtain information.

If this parameter is NULL, the 'Me' contact information for the calling peer is returned.

[out, optional] ppContact

Pointer to a pointer to a PEER_CONTACT structure. It receives the address of a PEER_CONTACT structure containing peer contact information for the peer name supplied in pwzPeerName. When this parameter is NULL, this function returns E_INVALIDARG.

Call PeerFreeData on the address of the PEER_CONTACT structure to free this data.

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.

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_CONTACT

Peer Collaboration API Functions