Notifies the application about device specific events occurring on a line, address, or call.
| C# | Visual Basic | Visual C++ |
public static event TapiDeviceSpecificEventHandler DeviceSpecific
Public Shared Event DeviceSpecific As TapiDeviceSpecificEventHandler
public: static event TapiDeviceSpecificEventHandler^ DeviceSpecific { void add (TapiDeviceSpecificEventHandler^ value); void remove (TapiDeviceSpecificEventHandler^ value); }
DeviceSpecific event is used by a telephony service provider to notify the application about device specific events. The application must negotiate device specific extension version using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line to receive DeviceSpecific events. The meaning of the event and its parameters are device specific. Please refer to the TAPI documentation for your telephony hardware to find out about device specific functionality supported by the telephony service provider.
| 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. |
The following code shows how to process DeviceSpecific event.
C#
TapiApp.Initialize("MyApp");
TapiApp.DeviceSpecific += OnDeviceSpecific;
...
void OnDeviceSpecific(object sender, TapiDeviceSpecificEventArgs args)
{
Console.WriteLine("Device specific event on line {0}", args.Line.Name);
Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3);
}
VB.NET
TapiApp.Initialize("MyApp")
AddHandler TapiApp.DeviceSpecific, AddressOf OnDeviceSpecific
...
Private Sub OnDeviceSpecific(ByVal sender As Object, ByVal args As TapiDeviceSpecificEventArgs)
Console.WriteLine("Device specific event on line {0}", args.Line.Name)
Console.WriteLine("Param1={0}, Param2={1}, Param3={2}", args.Param1, args.Param2, args.Param3)
End Sub
Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)