Share via


IUccSessionParticipant.Session 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 session associated with this participant.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

Syntax

'Declaration
ReadOnly Property Session As IUccSession
IUccSession Session { get; }
property IUccSession^ Session {
    IUccSession^ get ();
}
/** @property */
IUccSession get_Session ()
function get Session () : IUccSession

Property Value

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

Remarks

Win32 COM/C++ Syntax

HRESULT get_Session
(
   IUccSession** ppSession
);

Note

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.

Example

The following example is drawn from a class that wraps an instance of IUccEndpoint. The class maintains a cache of active IUccSessionParticipant instances (this.allParticipants). The example method finds the session participant of interest based upon a string representation of the session endpoint participant Uri. The Session property of the matched session participant is returned to calling code.

/// <summary>
/// locates the cached IUccSessionParticipant based on 
/// Uri string match and returns matching participant's session
/// </summary>
/// <param name="ParticipantUri">Uri string to match</param>
/// <returns>IUccSession, participant's session</returns>
private IUccSession GetParticipantSession(string ParticipantUri)
{
    IUccSession returnValue = null;
    foreach (IUccSessionParticipant thisParticipant in this.allParticipants)
    {
        if (thisParticipant.Uri.AddressOfRecord == ParticipantUri)
        {
            returnValue = thisParticipant.Session;
            break;
        }
    }
    return returnValue;
}

Thread Safety

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

Platforms

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

See Also

Reference

IUccSessionParticipant Interface
IUccSessionParticipant Members
Microsoft.Office.Interop.UccApi Namespace