The following code examples show the implementation of an event handler. The operations in the Initialize RTC and Register to Receive Events examples must be performed before using this code.
**Note **This code has not been thoroughly tested, does not contain error checking, and is not intended for production use.
// Note: This method is in the CRTCOutgoing class, which
// implements the IRTCEventNotification interface.
HRESULT STDMETHODCALLTYPE
CRTCOutgoing::Event( RTC_EVENT RTCEvent,
IDispatch * pEvent )
{
if (NULL != pEvent)
{
// Process each event type.
switch (RTCEvent)
{
case RTCE_CLIENT:
// Place process event code here.
break;
case RTCE_SESSION_STATE_CHANGE:
// Place process event code here.
break;
case RTCE_MEDIA:
// Place process event code here.
break;
//....
default:
// Handle for default.
break;
}
}
return hr;
}
See Also
Send Feedback on this topic to the authors