Share via


IRTCBuddyGroup::AddBuddy

The AddBuddy method adds an RTC 1.2 buddy to the buddy group.

HRESULT AddBuddy(IRTCBuddy*pBuddy);

Parameters

  • pBuddy
    [in] Pointer to the IRTCBuddy interface of the buddy to be added.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_E_INVALID_OBJECT_STATE The buddy is not in the active state.
E_POINTER The pBuddy parameter is not a valid pointer.

Remarks

If contact roaming is enabled, the AddBuddy method becomes an asynchronous function. If the return value fails, the operation fails. If the return is successful, the application must wait for the RTCE_GROUP event of type RTCGET_GROUP_BUDDY_ADD. The result code can be obtained from the IRTCBuddyGroupEvent::get_StatusCode method.

This method triggers the RTCE_GROUP event, which returns an IRTCBuddyGroupEvent interface.

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_IRTCBuddyGroup is defined as 60361E68-9164-4389-A4C6-D0B3925BDA5E.

See Also

IRTCBuddyGroup, IRTCBuddy, IRTCBuddy2, IRTCBuddyGroup::RemoveBuddy, Create a Buddy Group and Add Buddies