IRTCClientPresence2::EnablePresenceEx (Windows CE 5.0)

Send Feedback

This method enables the presence for a specific profile, attaching 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 provisioning profile to use for presence.

  • varStorage
    [in] Variant containing a reference to local storage.

    The following table shows the possible types.

    Value Description
    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 must be set to zero.

Return Values

This method can return an RTC_E_ constant.

The following table shows an additional return value and additional information about a specific return value.

Value Meaning
RTC_E_PRESENCE_ENABLED The presence has been previously enabled and remains active.
S_FALSE The RTC Client API cannot load the presence file from the file name specified in varStorage.

This does not prevent the RTC Client API from enabling the presence feature.

Remarks

EnablePresenceEx can be called only on a single profile object. Calling EnablePresenceEx on multiple profile objects results 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, which should not be used with the RTC version 1.0 IRTCClientPresence::EnablePresence or IRTCClientProvisioning::EnableProfile methods.

If the EnablePresenceEx method is called after presence has already been enabled with IRTCClientPresence::EnablePresence, the RTC Client API returns an RTC_E_PRESENCE_ENABLED error.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCClientPresence2 | IRTCClientPresence::EnablePresence | IRTCProfile | IRTCClientProvisioning::EnableProfile | IRTCClientProvisioning2::EnableProfileEx | IStream

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.