PeerCollabSetPresenceInfo function (p2p.h)

The PeerCollabSetPresenceInfo function updates the caller's presence information to any contacts watching it.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabSetPresenceInfo(
  [in] PCPEER_PRESENCE_INFO pcPresenceInfo
);

Parameters

[in] pcPresenceInfo

Pointer to a PEER_PRESENCE_INFO structure that contains the new presence information to publish for the calling peer application.

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

Contacts watching this peer's presence will have a PEER_EVENT_PRESENCE_CHANGED event raised locally that signals this peer's change in presence status. A peer's presence status cannot be set to offline while signed-in. By default, a peer's presence status is 'online' and the descriptive text is NULL when signing in.

Any descriptive text for presence status is limited to 255 Unicode characters.

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 Collaboration API Functions