Solved

How does the system name COM10 and higher?

Posted on 1998-07-01
2
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…

734 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