Windows SDK Communication Question
-
Greetings: Does anybody know anything about a limit to the COMn designation that can be successfully opened by the "CreateFile" SDK function? We have serial ports here that can take mappings greater than 9 (ie: COM10, COM11, etc...). "CreateFile" returns NULL for anything greater than COM9. Does anybody know a way of getting around this? Its Windows XP-Pro at the moment, but we have to expect our application to run on other versions as well. I'm using VS 2003 and MFC. Thank you, Mark
-
Greetings: Does anybody know anything about a limit to the COMn designation that can be successfully opened by the "CreateFile" SDK function? We have serial ports here that can take mappings greater than 9 (ie: COM10, COM11, etc...). "CreateFile" returns NULL for anything greater than COM9. Does anybody know a way of getting around this? Its Windows XP-Pro at the moment, but we have to expect our application to run on other versions as well. I'm using VS 2003 and MFC. Thank you, Mark
Jethro63 wrote:
Does anybody know anything about a limit to the COMn designation that can be successfully opened by the "CreateFile" SDK function?
This is special case code (or hack) in the implementation of
::CreateFile()
that recognizes the filename "COM" followed by one single integer. You can have COM ports from COM1 to COM255, but for port numbers above 9 you have to use"\\\\.\\COMnnn"
as filename, e.g."\\\\.\\COM10"
.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
Jethro63 wrote:
Does anybody know anything about a limit to the COMn designation that can be successfully opened by the "CreateFile" SDK function?
This is special case code (or hack) in the implementation of
::CreateFile()
that recognizes the filename "COM" followed by one single integer. You can have COM ports from COM1 to COM255, but for port numbers above 9 you have to use"\\\\.\\COMnnn"
as filename, e.g."\\\\.\\COM10"
.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown