This documentation is archived and is not being maintained.

IUccSessionParticipantCollectionEvent.Context Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets the context associated with the participant added to a session.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in

UccContext Context { get; }
/** @property */
UccContext get_Context ()

function get Context () : UccContext

Property Value

A value of the IUccContext** (IUccContext, for a .NET application) type.

The Context property exposed by IUccSessionParticipantCollectionEvent is a participant context property. This property must not be confused with an operation context property described in the following text.

Participant Context

This contains any additional participant context related to the participant added or removed from a session. This context is associated to the participant by passing a UccContext instance into CreateParticipant. This participant context is obtained in a _IUccSessionParticipantCollectionEvents event such as OnParticipantAdded.

Operation Context

Specific participant collection operation context is assigned when the session participant is added or removed with a call into AddParticipant or RemoveParticipant. The operational context associated with the operation of adding or removing participants is obtained by handling OnAddParticipant

Win32 COM/C++ Syntax

HRESULT get_Context
   IUccContext** pVal
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API.

The following example makes use of the Participant and Context properties of the IUccSessionParticipantCollectionEvent to.display information about the newly added participant.

void _IUccSessionParticipantCollectionEvents.OnParticipantAdded(
    IUccSession pEventSource, 
    UccSessionParticipantCollectionEvent pEventData)
    IUccSessionParticipant p = pEventData.Participant;
    UccContext ctx = pEventData.Context;
    if (ctx.IsNamedPropertySet("UserNickname"))
            ctx.get_NamedProperty("UserNickname").StringValue +
            " at " +
            p.Uri.Host +
                " added to the session");
            p.Uri.UserAtHost +
            " added to the session");


All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms