IRTCSession::AddParticipant
The AddParticipant method creates a participant and adds it to the session. Adding a participant to an idle session initiates the call. Phone-phone calls and MIM sessions can add more than one participant.
Calling the get_CanAddParticipants property on the session enables the UI to determine if it is possible to add a participant to the session.
HRESULT AddParticipant(BSTRbstrAddress,
BSTRbstrName,
IRTCParticipant**ppParticipant);
Parameters
- bstrAddress
[in] A BSTR that specifies the URI of the participant. This could be a SIP or TEL URI, e-mail address, IP address, or DNS name. Note that a SIP URI must contain legal characters as specified in RFC 3261. - bstrName
[in] A BSTR that specifies the displayable name of the participant. - ppParticipant
[out] Returns a pointer to the IRTCParticipant interface on the newly created Participant object. If this parameter is NULL, the method will not return an interface. This call adds a reference to the Participant object, which the caller is responsible for releasing.
Return Values
RTC methods may return an RTC_E_ constant.
Value | Meaning |
---|---|
RTC_E_INVALID_SESSION_STATE | Participant cannot be added in this state. |
ERROR_USER_EXISTS | There is already a participant with the same User URI. |
Remarks
This function may send data over the wire in unencrypted form; therefore, someone eavesdropping on the network may be able to read the data. The security risk of sending the data in clear text should be considered before using this method in an unencrypted session. An RTC session can be encrypted by specifying TLS in the profile used for the session.
Note The online status of participants in a MIM session will be available to all other participants in the session. This may result in compromised privacy information. If none of the participants in the session has blocked another participant from viewing his online status, no privacy information would be compromised. However, if any participant in the session has blocked another participant from viewing his online status, the first participant's privacy information would be compromised in a MIM session.
Requirements
Client: Requires Windows XP.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCSession is defined as 387c8086-99be-42fb-9973-7c0fc0ca9fa8.
See Also
IRTCSession, IRTCParticipant, IRTCSession::RemoveParticipant, IRTCSession::get_CanAddParticipants, Create a Session and Make a Call, Create a Multiparty IM Session and Add a Participant, Add a Participant to an Existing Session, Create an Outgoing Application Session, Create an Outgoing Session When the Client is Behind a NAT