Click or drag to resize
TapiCallGetCommHandle Method
Obtains a handle of the open communication port associated with the call.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public IntPtr GetCommHandle()

Return Value

Type: IntPtr
IntPtr that incapsulates a Win32 handle of the open communication port.
Exceptions
ExceptionCondition
TapiDisconnectExceptionThe call has been already disconnected.
TapiExceptionAddTapi.NET cannot obtain a handle because a TAPI error occurred.
Remarks

GetCommHandle obtains a handle of the open communication port of the data modem. Returned handle can be used to transfer data between the application and the remote terminal. The telephony service provider opens the port in overlapped I/O mode and configures the port using the settings specified in the Control Panel. The application can set additional configuration options for the device by using communications functions with the returned handle.

The application assumes ownership of the returned handle. The handle must be closed using CloseHandle Win32 function before the call is disconnected (before calling Disconnect). We recommend using SafeFileHandle wrapper to manage the returned handle.

See Also