TBApiAddDevice API Call

 

Description

Add or replace a new controller to/in the device list.

Parameters

aControllerKey

the numeric part of the controller key (e.g. for TS001 = 1)

aDeviceHandle

the device handle  to add or replace - use 0 to assign the next available

aLogicalDeviceSegment

the desktop segment controlled by this controller, pass NULL for "Whole Desktop"

aDeviceName

a name to identify the controller, pass NULL to assign an auto generated id and increment the # of controllers

 

aDisplayUnbound

flag if the device should be shown if it has never been bound

 

aPort

is the comport for a serial device

Returns

0 = fail, 1 = OK.

Notes

It is necessary to invoke TBApiApply for the changes to take effect.

 

Visual C++ Declaration/example

 

BOOL TBAPI TBApiAddDevice(int aControllerKey, HTBDEVICE aDevice, const TCHAR* aLogicalDeviceSegment, const TCHAR* aDeviceName, int aDisplayUnbound, const TCHAR* aPort);

 

Visual Basic Declaration/example

 

Public Declare Function TBApiAddDevice Lib "TBapi" Alias “_DLL_TBApiAddDevice@16" _

(ByVal aControllerKey as Long, ByVal aDevice As Long, ByVal aLogicalDeviceSegment As String, ByVal aDeviceName As String, ByVal aDisplayUnbound As Long, ByVal aPort As String) As Boolean