Partager via


IRTCClientPresence::EnablePresence (Windows CE 5.0)

Send Feedback

This method enables the presence functionality for both outgoing and incoming subscriptions. Presence is not enabled until this method is called. This method can be called only once.

Note   The storage used in this method is subject to change and further revisions.

HRESULT EnablePresence(VARIANT_BOOLfUseStorage,VARIANTvarStorage);

Parameters

  • fUseStorage
    [in] VARIANT_TRUE if the lists load from storage and automatically commit changes back to storage.

    VARIANT_FALSE enable presence, but not use storage. Presence is enabled with empty buddy and watcher lists.

  • varStorage
    [in] The persistent storage for the buddy list and the allowed and blocked watcher lists. This variant can contain the following:

Return Values

This method can return an RTC_E_ constant.

The following table shows an additional possible return value.

Value Meaning
S_FALSE Presence was enabled but failed to load from storage.

Remarks

The application should call this method only after a PC-to-PC profile has been enabled for presence, using the IRTCClientProvisioning::EnableProfile method.

The application uses this default profile when creating buddies from the presence store (fUseStorage is set to VARIANT_TRUE).

The application must call EnablePresence before calling other presence methods. Subsequent calls to EnablePresence close the existing presence store and the new specified store is opened.

If there is no storage, the buddy list is lost.

The buddy and watcher objects have a persistence property that is set when they are added to the presence list. EnablePresence determines whether they are part of the persistent storage (varStorage).

Security Note   The RTC Client API does not set ACLs on the presence storage file. An application might set an ACL on this file for better security.

Requirements

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

See Also

IRTCClientPresence | IPersistStream | IRTCClientProvisioning::EnableProfile | ISequentialStream | IStream

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.