Windows applications haven't the
main
function (the have the
WinMain[
^] entry point, moreover if you are using a framework like
MFC
, such function is hidden).
You should read a good tutorial on
Windows
programming (or play a bit with
Visual Studio
generated skeleton for a
Win32
or
MFC
application).
Usually you may directly use
Win32 API
(i.e. you don't need third party libraries) for serial communication, their usage is pretty straightforward, see for instance
"Using Communication Resources"[
^] at
MSDN
.