In Win32, you no longer have to worry about the low-level detail of handling each byte being transferred to/from some piece of hardware.

For instance, to access a COM port, you would begin with CreateFile and a filename like "\\\\.\\COM3"
Then scroll down to Communications Resources and carry on reading and following links.

> That's is why i don't wan to modify a lot the structure of my program.
To be honest, I might think about starting again.
If you're working with some old software, which has a history of being modified by many different people over a number of years, then it's going to look pretty horrible in places. It will contain all sorts of 'DOS-hacks' necessary to make it work on DOS (eg. interrupts, worrying about 64K limits etc), and may even contain large amounts of dead code. It may also implement some features which are no longer needed.

Attempting a line-by-line translation of that to Win32 will retain much of that, and add another layer of confusion for future maintainers.

But if you do rewrite it in Win32 from scratch, then it will be a nice clean implementation which would be a solid base for future development and enhancement. You keep the old program as it stands as a reference to work to.