How to disable CR/LF conversion when sending and receiving binary data over Serial Port ?

TireReturn 1 Reputation point
2022-09-26T23:16:14.243+00:00

I have tried CreateFile which works well for sending the binary data out but receiving binary data always ends up with 0xD being inserted before 0xA.
I need the data to be exchanged with no CR/LF translation.
I have tried using SerialPort and changing the Encoding to UTF8, and Unicode, with no luck.
What should I do ?
Thanks

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
{count} votes