I\'ve problem with serial port.
I\'ve written a program that can read ports COM1 to COM9, but can open COMXX(like com10, com11, etc.)
I\'ve searched and lear
You need to escape the backslashes in the filename parameter:
myPort = CreateFile("\\\\.\\COM14",
GENERIC_READ | GENERIC_WRITE,
0, /* exclusive access */
NULL, /* no security attrs */
OPEN_EXISTING,
0,
NULL );
You're also trying to open COM port 14. Do you really have 14 COM ports on your machine? Try COM1
instead.