Uart.dll for windows 95/nt, Open_com, Close_com – Measurement Computing CB-NAP-7000P User Manual
Page 12

8
4
UART.DLL for Windows 95/NT
There are six DLL functions provided in the UART.DLLs. This section briefly describes these functions and the
various parameters used in each.
4.1 Open_Com
z Description:
This DLL will initialize the COM port. This DLL must be called once before the other DLLs are called to
send/receive command.
z Syntax:
WORD Open_Com(char cPort, DWORD dwBaudRate, char cData, char cParity, char cStop)
z Input Parameter:
cPort: 1=COM1, 2=COM2, 3=COM3, 4=COM4, others = invalidate
dwBaudRate: 1200/2400/4800/9600/19200/38400/57600/115200
cData: 5/6/7/8 data bit
cParity: 0=NonParity, 1=OddParity, 2=EvenParity
cStop: 0=1-stop, 1=1.5-stp, 2=2-stop
NOTE: cData=8, cParity=0, cStop=0 for CB-7000 modules
z Return Value:
NoError = OK
others = Error code, refer to I7000.H
4.2 Close_Com
z Description:
This DLL will free all the resources used by Open_Com. This DLL must be called before the program exit. The
Open_Com will return error message if the program exit without calling Close_Com function.
z Syntax:
WORD Close_Com(char cPort)
z Input Parameter:
cPort : 1=COM1, 2=COM2, 3=COM3, 4=COM4, others = invalidate
z Return Value:
NoError = OK
others = Error code, refer to I7000.H