AddTapi.NET Developer's Manual
TapiError Event
NamespacesTraysoft.AddTapiTapiAppTapiError
Occurs when Telephony API (TAPI) error is received while performing an asynchronous operation.
Declaration Syntax
C#Visual BasicVisual C++
public static event TapiErrorEventHandler TapiError
Public Shared Event TapiError As TapiErrorEventHandler
public:
static  event TapiErrorEventHandler^ TapiError {
	void add (TapiErrorEventHandler^ value);
	void remove (TapiErrorEventHandler^ value);
}
Remarks
AddTapi.NET performs some operations asynchronously using background threads. This event is fired when TAPI error occurs during asynchronous operation. The application should report such errors to the user.
Note:
In Windows Forms application 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 controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to process TapiError event.

C#

            TapiApp.Initialize("MyApp");
            TapiApp.TapiError += OnTapiError;
            ...
            
            void OnTapiError(object sender, TapiErrorEventArgs args)
            {
                // Display the error message
                Console.WriteLine(args.Message);
            }
            

VB.NET

            TapiApp.Initialize("MyApp")
            AddHandler TapiApp.TapiError, AddressOf OnTapiError
            ...
            
            Private Sub OnTapiError(ByVal sender As Object, ByVal args As TapiErrorEventArgs)
                ' Display the error message
                Console.WriteLine(args.Message)
            End Sub
            

Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)