1、采用mscomm32.ocx控件,但我无论如何都没法把Microsoft Communications Control加载到PB中,包括各种方法注册,重启电脑,安装VC6等,在PB9的insert control中就是找不到Microsoft Communications Control。
2、采用API,则无法定义DCB、COMMPROP、COMMTIMEOUTS类型,也就是说还没能进行API方式测试
难道PB9就无法实现串口通信么?我要崩溃了,3天了,还没法从串口读取数据!立了军令状啊!!!!!!
------解决方案--------------------
DCB、COMMPROP、COMMTIMEOUTS是结构体
- C/C++ code
type commprop from structure integer wPacketLength integer wPacketVersion long dwServiceMask long dwReserved1 long dwMaxTxQueue long dwMaxRxQueue long dwMaxBaud long dwProvSubType long dwProvCapabilities long dwSettableParams long dwSettableBaud integer wSettableData integer wSettableStopParity long dwCurrentTxQueue long dwCurrentRxQueue long dwProvSpec1 long dwProvSpec2 character wcProvChar[1]end typetype commtimeouts from structure long ReadIntervalTimeout long ReadTotalTimeoutMultiplier long ReadTotalTimeoutConstant long WriteTotalTimeoutMultiplier long WriteTotalTimeoutConstantend typetype dcb from structure long DCBlength long RaudRate long fBinary long fParity long fOutxCtsFlow long fOutxDsrFlow long fDtrControl long fDsrSensitivity long fTXContinueOnXoff long fOutX long fInX long fErrorChar long fNull long fRtsControl long fAbortOnError long fDummy2 integer wReserved integer XonLim integer XoffLim character ByteSize character Parity character StopBits character XonChar character XoffChar character ErrorChar character EofChar character EvtChar character wReserved1end type
------解决方案--------------------
PB9打补丁看看.
------解决方案--------------------
同意楼上的说法,打补丁,或者换个PB的安装版本
------解决方案--------------------
最好打到pb9.03的补丁。