AddTapi.NET Developer's Manual
UseSynchronizationContext Property
NamespacesTraysoft.AddTapiTapiAppUseSynchronizationContext
Indicates whether AddTapi.NET should use SynchronizationContext when firing events.
Declaration Syntax
C#Visual BasicVisual C++
public static bool UseSynchronizationContext { get; set; }
Public Shared Property UseSynchronizationContext As Boolean
public:
static property bool UseSynchronizationContext {
	bool get ();
	void set (bool value);
}
Remarks

When the application initializes AddTapi.NET, AddTapi.NET acquires SynchronizationContext of the thread that called Initialize(String) method. If UseSynchronizationContext property is true, AddTapi.NET uses acquired synchronization context to send events to the application. This mechanism ensures that events arrive to the UI thread of Windows Forms application and the application can access Windows Forms controls from the event handlers.

Set UseSynchronizationContext to false if you want AddTapi.NET to call event handlers on a separate thread. In this case Windows Forms application will need to use its own synchronization mechanism to access Windows Forms controls from the event handlers.

This property has no effect for service applications. Applications that run as Windows service do not have synchronization context by default. All event handlers are called on a separate thread in service applications.

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