Initializes AddTapi.NET.
Namespace: Traysoft.AddTapiAssembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax public static void Initialize(
string applicationName
)
Public Shared Sub Initialize (
applicationName As String
)
public:
static void Initialize(
String^ applicationName
)
Parameters
- applicationName
- Type: SystemString
A string that contains the name of the application.
Exceptions Exception | Condition |
---|
TapiException | The 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 |
---|
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
{
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);
}
Try
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
No code example is currently available or this language may not be supported.
See Also