This documentation is archived and is not being maintained.

_IUccSessionManagerEvents.OnOutgoingSession Method

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.

Raised when the session manager object creates an outgoing session.

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

void OnOutgoingSession (
	IUccEndpoint pEventSource,
	UccOutgoingSessionEvent pEventData
)
void OnOutgoingSession (
	IUccEndpoint pEventSource, 
	UccOutgoingSessionEvent pEventData
)
function OnOutgoingSession (
	pEventSource : IUccEndpoint, 
	pEventData : UccOutgoingSessionEvent
)

Parameters

pEventSource

A value of the IUccEndpoint* (IUccEndpoint, for a .NET application) type. This identifies the IUccSessionManager instance raising this event. The IUccSessionManager instance is also an IUccEndpoint instance as the interface is queried from the IUccEndpoint instance.

pEventData

A value of the IUccOutgoingSessionEvent* (UccOutgoingSessionEvent, for a .NET application) type. This specifies the event data about the outgoing session.

This event allows an application to execute appropriate logic when the local user has created a new outgoing session. It is particularly useful when the application class that created the new session on the session manager is not the class designated as the event sink for session manager events. A client application can cache the collection of active sessions using this event handler. The new IUccSession instance is exposed by the Session property of pEventData

Win32 COM/C++ Syntax

HRESULT OnOutgoingSession
(
   IUccEndpoint* pEventSource,
   IUccOutgoingSessionEvent* pEventData
);
Cc667981.note(en-us,office.12).gifNote:
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.

This example is drawn from an application class implemented to handle events raised by an instance of IUccSessionManager. The event handler adds the new session to an application cache, sessionList. (List<IUccSession>)

/// <summary>
/// Handles OnOutgoingSession events for an instance of IUccSessionManager
/// </summary>
/// <param name="pEventSource">The endpoint originating the new session</param>
/// <param name="pEventData">The new session</param>
void _IUccSessionManagerEvents.OnOutgoingSession(
    IUccEndpoint pEventSource,
    UccOutgoingSessionEvent pEventData)
{
    //add new session to an application session cache
    //List<IUccSession>
    this.sessionList.Add(pEventData.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

Show: