Limit buffer size

  • Thread starter Thread starter Juliano.net
  • Start date Start date
Juliano.net said:
How can I limit the buffer size for an I/O port (serial port) via C++?

In unmanaged C++ and Win32, first open the serial port with CreateFile, then
call SetupComm.

In C++/CLI, instantiate a System::IO::Ports::SerialPort object and set the
ReadBufferSize and/or WriteBufferSize properties.

Note that in either case, Windows and/or the serial port driver is free to
decide on the appropriate buffer sizes. Your settings are treated as
recommendations, not mandates.

Sean
 
Back
Top