Поделиться через


IRTCClientPresence2::EnablePresenceEx (Windows Embedded CE 6.0)

1/6/2010

Note

This method is unsupported in Windows Embedded CE 6.0.

This method enables the presence for a specific profile, attaching buddies and watchers found in the specified local storage.

Syntax

HRESULT EnablePresenceEx( 
  IRTCProfile* pProfile, 
  VARIANT varStorage, 
  long lFlags 
);

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 Value

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

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

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

Other Resources

IStream