Click or drag to resize
TapiAppLineClosed Event
Occurs when a line is forcibly closed by Windows because of hardware error or configuration changes.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public static event TapiEventHandler LineClosed

Value

Type: Traysoft.AddTapiTapiEventHandler
Remarks
This event occurs when a telephony line that the application opened by calling Open(Boolean, TapiCallHandler) has been forcibly closed by Windows. The common cause is a hardware error or incorrect device driver. The application should report this error to the user and try to open the line again at later time.
Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle LineClosed event.
TapiApp.Initialize("MyApp");
TapiApp.LineClosed += OnLineClosed;
...

void OnLineClosed(object sender, TapiEventArgs args)
{
    // Display a message to the user
    Console.WriteLine("{0} has been forcibly closed", args.Line.Name);
}
See Also