RTCE_SESSION_STATE_CHANGE events have an IRTCSessionStateChangeEvent interface. This type of event is fired when a session changes state.
When the application's implementation of the IRTCEventNotification::Event method indicates an RTC_EVENT of type RTCE_SESSION_STATE_CHANGE, the method's pEvent parameter is an IDispatch pointer for the IRTCSessionStateChangeEvent interface. The methods of this interface can be used to retrieve information concerning the status code and change in the state of the Session.
For more information on creating this interface, see the Answer a Call code example.
Methods in Vtable Order
The IRTCSessionStateChangeEvent interface inherits the methods of the standard COM interface IUnknown.
In addition, IRTCSessionStateChangeEvent defines the following methods.
|get_Session||Returns the Session object that changed state.|
|get_State||Returns the new state of the Session.|
|get_StatusCode||Returns the result code associated with the state change.|
|get_StatusText||Returns the status text associated with the state change.|
If the state of the session is RTCSS_INCOMING, the application should hold a reference to the session object. The IRTCSessionStateChangeEvent::get_Session method adds a reference to the IRTCSession2 interface. The application should not release this reference on the session object until it receives an event indicating that the session is in the RTCSS_DISCONNECTED state. The RTC API does not hold a reference to the session object and the session object will get deleted once the application releases the IRTCSessionStateChangeEvent object.
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_IRTCSessionStateChangeEvent is defined as b5bad703-5952-48b3-9321-7f4500521506.