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 |
---|---|
|
There is not enough memory to support this operation. |
|
One of the arguments is invalid. |
|
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:
- The endpoint must have been previously obtained by calling PeerCollabEnumEndpoints.
- The local peer must have subscribed to the endpoint by calling PeerCollabSubscribeEndpointData.
- The endpoint data must be refreshed by calling PeerCollabRefreshEndpointData successfully.
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 |