Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The EnablePresenceEx method will enable presence for a specific profile, attaching any buddies and watchers found in the specified local storage.
HRESULT EnablePresenceEx(IRTCProfile*pProfile,
VARIANTvarStorage,
longlFlags);
Parameters
pProfile
[in] Pointer to an IRTCProfile interface that specifies a particular profile to use for presence.varStorage
[in] VARIANT structure containing a reference to local storage. It can be one of the following types.Value Meaning VT_NULL No local storage. VT_BSTR File name for local storage. VT_UNKNOWN, VT_DISPATCH IStream pointer for local storage. lFlags
[in] Reserved. This value should be set to zero.
Return Values
RTC methods may return an RTC_E_ constant.
Value | Meaning |
---|---|
RTC_E_PRESENCE_ENABLED | The presence has been previously enabled and remains active. |
RTC_E_CLIENT_NOT_INITIALIZED | The client object has not been initialized. |
S_FALSE | The RTC API cannot load the presence file from the file name specified in varStorage. This does not prevent the RTC API from enabling the presence feature. |
Remarks
EnablePresenceEx can be called only on a single profile object. Calling EnablePresenceEx on multiple profile objects will result in an RTC_E_PRESENCE_ENABLED error.
Roaming contacts are not supported when the Registrar server in the profile specifies the UDP transport. If UDP is the transport, presence can only be enabled with a local presence store specified in the varStorage parameter. To specify local storage, set the varStorage parameter to VT_UNKNOWN, VT_DISPATCH, or VT_BSTR.
For the client’s presence information to be stored on the server, the EnablePresenceEx method should be called before registering with the server with the IRTCClientProvisioning2::EnableProfileEx method. This method should not be used with the RTC version 1.0 ITRCClientPresence::EnablePresence or ITRCClientProvisioning::EnableProfile methods. If the EnablePresenceEx method is called after presence has already been enabled with ITRCClientPresence::EnablePresence, the RTC Client API will return an RTC_E_PRESENCE_ENABLED error.
Requirements
Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClientPresence2 is defined as AD1809E8-62F7-4783-909A-29C9D2CB1D34.
See Also
IRTCClientPresence, IRTCClientPresence2, IRTCClientPresence::EnablePresence, Presence, Buddy Group Events