Cportv2.0
所属分类:Windows编程
开发工具:C++ Builder
文件大小:76KB
下载次数:10
上传日期:2007-05-12 23:22:28
上 传 者:
tanhong
说明: Serial Communications Library for C/C++
,Cport is a registered trademark of Bri Productions. All other product and
brand names are trademarks or registered trademarks of their respective
holders
(Serial Communications Library for C/C, Cport is a registered trademark of Bri Producti ons. All other product and brand names are trade marks or registered trademarks of their respec tive holders)
文件列表:
COMDEMO.C (26662, 1993-04-09)
COMDEMO.DOC (1909, 1993-04-09)
COMDEMO.EXE (24354, 1993-04-09)
CPORT.DOC (191484, 1993-11-06)
CPORT.H (11454, 1993-04-09)
CPORT.HPP (8140, 1993-04-09)
CPORTS.LIB (19456, 1993-04-09)
FILE.LST (445, 1993-04-09)
FILE_ID.DIZ (59, 1995-04-19)
XMODEM.H (2196, 1993-04-09)
This file contains important last minute information for Cport v2.0.
Please Take a moment to read it.
General
-------
- Traditionally header files of a library are included as they are
needed like so.
#include "cport.h"
#include "xmodem.h"
Problems sometimes arise when header files are not included in the
correct order. To remedy this situation we added an alternative way
of including header files. Instead of including each header file,
only cport.h needs to be included and symbols are defined to inform
cport.h to include certain files.
#define Uses_Xmodem
#include "cport.h"
'Uses_Xmodem' is currently the only symbol, but new ones will be
added as new features are added in subsequent versions.
- If you use the structure typedef 'CPARAM', make sure your compiler
is generating byte alignment. For Borland C/C++ and Microsoft C/C++
this is taken care of. For other compilers check your documentation.
C
_
- The documentation shows the function ComClose as returning 'void'.
It actually returns a NULL serial port handle (COM). This is so that
a serial port handle may be optionally NULLed when the serial port is
closed. NULLing a serial port handle can be used to mark it as unused.
Example:
int main()
{
COM com;
com = ComOpen(COM1, B19200, W8|S1|NONE, 1024, 512);
...later
/* Close the serial port and NULL the serial port handle
*/
com = ComClose(com);
... continued
C++
---
- Most C++ compilers pre-define the symbol '__cplusplus'. Cport
looks for this symbol to detect a C++ compile. If your C++ compiler
does not define this symbol, simply define it before you include
cport.h.
#define __cplusplus
#include "cport.h"
近期下载者:
相关文件:
收藏者: