Initializes AddTapi.NET.
- applicationName (String)
- A string that contains the name of the application.
This method initializes AddTapi.NET and registers application name with Windows Telephony service.
Initialize also populates Lines and Voices collections.
Application must call this method before using any other AddTapi.NET functionality.
| This method is not thread safe and should be called on the main thread of your application (UI thread for Windows Forms applications). AddTapi.NET captures synchronization context of the thread that calls Initialize and uses captured context to call event handlers on the same thread. |
The following code shows how to initialize AddTapi.NET.
C#
try
{
// Initialize AddTapi.NET
TapiApp.Initialize("SampleApplication");
}
catch (TapiException exc)
{
Console.WriteLine("TAPI error during initialization. {0}", exc.Message);
}
catch (Exception exc)
{
Console.WriteLine("Exception during initialization. {0}", exc.Message);
}
VB.NET
Try
' Initialize AddTapi.NET
TapiApp.Initialize("SampleApplication")
Catch exc As TapiException
Console.WriteLine("TAPI error during initialization. {0}", exc.Message)
Catch exc As Exception
Console.WriteLine("Exception during initialization. {0}", exc.Message)
End Try
| Exception | Condition |
|---|---|
| TapiException | The initialization failed because of Telephony API (TAPI) error. |
Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)