PeerCollabAddContact function (p2p.h)
The PeerCollabAddContact function adds a contact to the contact list of a peer.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabAddContact(
[in] PCWSTR pwzContactData,
[out, optional] PPEER_CONTACT *ppContact
);
Parameters
[in] pwzContactData
Pointer to a zero-terminated Unicode string buffer that contains the contact data for the peer that is added to the contact list. This string buffer can either be obtained by passing the peer name of the endpoint to add as a contact to PeerCollabQueryContactData, or through an out-of-band mechanism.
To send its own contact data out-of-band, the peer can call PeerCollabExportContact with a NULL peer name. This function returns the contact data in XML format.
[out, optional] ppContact
Pointer to a pointer to a PEER_CONTACT structure. This parameter receives the address of a PEER_CONTACT structure containing peer contact information for the contact supplied in pwzContactData. This parameter may be NULL.
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 |
---|---|
|
There is not enough memory to support this operation. |
|
One of the arguments is invalid. |
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 |