Compartilhar via


IRTCClientPresence2::AddGroup (Windows CE 5.0)

Send Feedback

This method adds a new buddy group. A client can have a maximum of 64 groups.

HRESULT AddGroup( BSTRbstrGroupName,BSTRbstrData,IRTCProfile*pProfile,longlFlags,IRTCBuddyGroup**ppGroup );

Parameters

  • bstrGroupName
    [in] The name of the group.

  • bstrData
    [in] Data for the new group.

  • pProfile
    [in] Pointer to an IRTCProfile interface specifying a provisioning profile to use for this group.

    It is taken into account only when the RTCCS_FORCE_PROFILE flag is specified in lFlags. Otherwise, it must be set to NULL, and the RTC Client API chooses the best profile to use.

    If the RTCCS_FORCE_PROFILE flag is set and the parameter is NULL, no profile is used.

  • lFlags
    [in] RTCCS_ specifying the force profile flag setting.

  • ppGroup
    [out] Pointer to the IRTCBuddyGroup interface.

    This parameter can be NULL, indicating that the method should not retrieve an interface.

    This method adds a reference to the group object, which the caller is responsible for releasing.

Return Values

This method can return an RTC_E_ constant.

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

Value Meaning
RTC_E_GROUP_EXISTS The group already exists.
E_INVALIDARG The bstrGroupName parameter is NULL.
E_POINTER The ppGroup parameter is not a valid pointer.

Remarks

When contact roaming is enabled, the AddGroup method is asynchronous.

The application must wait for the RTCE_GROUP event (defined in the RTC_EVENT enumeration) with event type RTCGET_GROUP_ADD (defined in the RTC_GROUP_EVENT_TYPE enumeration) to retrieve the IRTCBuddyGroup interface.

The IRTCBuddyGroupEvent::Buddy method returns the IRTCBuddyGroup interface.

Requirements

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

See Also

IRTCClientPresence2 | IRTCBuddyGroup | IRTCBuddyGroupEvent::Buddy | IRTCClientPresence2::RemoveGroup | IRTCProfile | RTC_EVENT | RTC_GROUP_EVENT_TYPE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.