TBApiGetNamedDevice API Call

 

Description

Gets the device handle using the name assigned to it

Parameters

Device name

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 TBApiGetNamedDevice( const TCHAR* aName);

 

HTBDEVICE device = TBApiGetNamedDevice(_T("Whiteboard 1"));

 

Visual Basic Declaration/example

 

Public Declare Function TBApiGetNamedDevice Lib "TBapi" Alias "_DLL_TBApiGetNamedDevice@4" (ByVal aName As String) As Byte

 

Dim device as Byte

Device = TBApiGetNamedDevice(“Whiteboard 1”)