Solved

How does the system name COM10 and higher?

Posted on 1998-07-01
2
254 Views
Last Modified: 2013-12-03
Is there a naming convention for com ports higher than 9?

CreateFile fails with a 'file not found' (winerror 2) when I try to open "COM10"; but
hyperterminal opens COM10 without complaint.
0
Comment
Question by:rosex
2 Comments
 
LVL 6

Accepted Solution

by:
alamo earned 50 total points
ID: 1409155
Opening "COM1" is just a shortcut CreatFile recognizes for convenience... the more technical way to open the comport is by specifying it as a device using

"\\\\.\\COM10"

(That's \\.\COM10 with the \ escaped so C doesn't get confused).

See Q115831 at http://support.microsoft.com/support/kb/articles/Q115/8/31.asp

Hope this helps!
0
 

Author Comment

by:rosex
ID: 1409156
Thanks, I found the same article with some direction from MSDN.
I was just about to come back and close the question!
I've updated my source, and I'm glad to report it works as
promised.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question