Setting Presence Information

The application calls the IRTCClientPresence::SetLocalPresenceInfo method to set the user status and notes that are published as part of the presence information.

An IRTCPresenceStatusEvent is fired when the operation to set the presence information is complete. The success or failure of this operation is obtained from the status code, as shown in the following code example.

 
 
Example 1: Setting the local presence information.  
// Get the RTC client presence interface.
IRTCClientPresence * pPresence = NULL;
 
hr = m_pClient->QueryInterface(uuidof(IRTCClientPresence),
                               (void **)&pPresence);

// If (hr != S_OK), process the error here.  
 
// Set the local presence status.
hr = pPresence->SetLocalPresenceInfo(RTCXS_PRESENCE_ONLINE, bstrNotes);
 
// If (hr != S_OK) process the error here.  
pPresence->Release();
 

FakePre-7c38596d71764ec794af20ee0a106c3c-ca2fb9826d4f44a2aed338068a7171f2