Share via


Handle Events

The following code examples show the implementation of an event handler. The operations in the Initialize the Communications Service 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;
}

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.