TBApiGetComPortNames API Call

 

Description

Get a list of com port names on the current machine.

Parameters

A pointer to the buffer to receive the com port names and the length of this buffer.

Returns

0 = fail, 1 = OK.

Notes

The UPDD driver must be active.
The buffer must be large enough to contain all possible names and the items are separated by newline characters.

 

Visual C++ Declaration/example

 

BOOL TBAPI TBApiGetComPortNames(TCHAR* aBuff,int aBuffLength)

 

Visual Basic Declaration/example

 

Public Declare Function TBApiGetComPortNames Lib "TBapi" Alias _DLL_TBApiGetComPortNames@8" (ByVal aBuff as String, ByVal aBuffLength As Long) As Long