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

TireReturn 1 Reputation point

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 ?

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,441 questions
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,553 questions
{count} votes