PeerCollabQueryContactData function (p2p.h)

The PeerCollabQueryContactData function retrieves the contact information for the supplied peer endpoint.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabQueryContactData(
  [in, optional] PCPEER_ENDPOINT pcEndpoint,
  [out]          PWSTR           *ppwzContactData
);

Parameters

[in, optional] pcEndpoint

Pointer to a PEER_ENDPOINT structure that contains the peer endpoint about which to obtain contact information.

If this parameter is set to NULL, the contact information for the current peer endpoint is obtained.

[out] ppwzContactData

Pointer to a zero-terminated Unicode string buffer that contains the contact data for the endpoint supplied in pcEndpoint. Call PeerFreeData to free the 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_FOUND
The requested contact data does not exist. Try calling PeerCollabRefreshEndpointData before making another attempt.

Remarks

To retrieve contact data for an endpoint successfully, one of the following must occur:

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_ENDPOINT

Peer Collaboration API Functions