Visual c++ 如何在vc+中通过串口传输二进制文件+;
嗨,我必须从磁盘读取一个二进制文件,我必须通过串行端口传输该文件,我在vc++6.0中使用mscomm 如何通过串口传输二进制文件Visual c++ 如何在vc+中通过串口传输二进制文件+;,visual-c++,mfc,Visual C++,Mfc,嗨,我必须从磁盘读取一个二进制文件,我必须通过串行端口传输该文件,我在vc++6.0中使用mscomm 如何通过串口传输二进制文件 提前感谢。有一个关于CodeProject的综合库- 下面是一个示例用例 CSerial serial; // Attempt to open the serial port (COM1) serial.Open(_T("COM1")); // Setup the serial port (9600,N81) using hardware handshaking
提前感谢。有一个关于CodeProject的综合库- 下面是一个示例用例
CSerial serial;
// Attempt to open the serial port (COM1)
serial.Open(_T("COM1"));
// Setup the serial port (9600,N81) using hardware handshaking
serial.Setup(CSerial::EBaud9600,CSerial::EData8,CSerial::EParNone,CSerial::EStop1);
serial.SetupHandshaking(CSerial::EHandshakeHardware);
// The serial port is now ready and we can send/receive data. If
// the following call blocks, then the other side doesn't support
// hardware handshaking.
serial.Write("Hello world");
// Close the port again
serial.Close();
它包括异步和同步实现