TBApiGetDeviceFromSegment API Call

 

Description

Gets the device handle using the name of its logical screen segment.

Parameters

Name of segment.

Returns

The device handle or a value of TB_INVALID_HANDLE_VALUE means that the requested device does not exist.

Notes

None.

See also

A number of functions require a device handle. The following family of functions provide valid device handle’s:

 

TBApiGetRelativeDevice

Get device handle from position

 

TBApiGetRelativeDeviceFromHandle

Get position from device handle

 

TBApiGetNamedDevice

Get device handle from named device

 

TBApiGetDeviceFromSegment

Get device handle from segment

 

TBApiGetRelativeDeviceNoHidden

Get device handle from position, excluding hidden (unplugged) devices

 

TBApiGetRelativeDeviceIncHidden

Get device handle from position, including hidden (unplugged) devices

 

Visual C++ Declaration/example

 

HTBDEVICE TBAPI TBApiGetDeviceFromSegment(const TCHAR* aSegment);

 

HTBDEVICE device = TBApiGetDeviceFromSegment(_T("Left Half"));

 

Visual Basic Declaration/example

 

Public Declare Function TBApiGetDeviceFromSegment Lib "TBapi" Alias "_DLL_TBApiGetDeviceFromSegment@4" (ByVal aSegment as String) as Byte

 

Dim device As Byte

device = TBApiGetDeviceFromSegment("Left Half")