Click or drag to resize
TapiAppInitialize Method
Initializes AddTapi.NET.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public static void Initialize(
	string applicationName
)

Parameters

applicationName
Type: SystemString
A string that contains the name of the application.
Exceptions
ExceptionCondition
TapiExceptionThe initialization failed because of Telephony API (TAPI) error.
Remarks
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.
Note Note
This method is not thread safe and should be called on the main thread of the 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.
Examples
The following code shows how to initialize AddTapi.NET.
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);
}
See Also