Events

Events are a crucial part of call handling for the RTC Client API. Event handling includes the following steps.

To register for and enable the reception of events

  1. Implement the IRTCEventNotification::Event method. (The RTC Client API calls this method when an event occurs.) Typically, this implementation does no more than AddRef the IDispatch interface pointer, then post to the application's message pump.

  2. Register the IRTCEventNotification outgoing interface using the COM standard IConnectionPointContainer and IConnectionPoint interfaces, and pass the IConnectionPoint::Advise method a pointer to IRTCEventNotification::Event.

  3. Call the IRTCClient::put_EventFilter method to tell the RTC Client API which events the application will handle. The event filter consists of ORed members of the RTC_EVENT enumeration.

    Note  You must call the IRTCClient::put_EventFilter method to set the event filter mask and enable reception of events. If you do not call this method, your application will not receive any events.

See Register to Receive Events for code examples that illustrate the registration process and Answer a Call for a code example that shows one use of events.