How to find friendly port names (vc++)

D

Don

I am writing a program and need to identify the friendly names of
ports. I have queried the registry key
HKEY_LOCAL_MACHIN\\EHARDWARE\\DEVICEMAP\\SERIALCOMM, but all that tells
me is which ones actually exist. Is there a way to get the names of
the devices, such as those shown in the Device Manager under "Ports"?

Thanks,
 
?

=?iso-8859-1?q?Erik_Wikstr=F6m?=

I am writing a program and need to identify the friendly names of
ports. I have queried the registry key
HKEY_LOCAL_MACHIN\\EHARDWARE\\DEVICEMAP\\SERIALCOMM, but all that tells
me is which ones actually exist. Is there a way to get the names of
the devices, such as those shown in the Device Manager under "Ports"?

Sorry, that's quite a bit off-topic here, but this might give you some
ideas of where to post your question:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9, while
you're at it, read the whole page, it's quite useful.
 
D

Don

Erik said:
Sorry, that's quite a bit off-topic here, but this might give you some
ideas of where to post your question:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9, while
you're at it, read the whole page, it's quite useful.


"For example, C++ code design, syntax, style, rules, bugs, etc."

I thought that my question was on topic, basically asking if there was
a c++ call to access a particular system parameter. If I was mistaken,
my apologies.

Thanks
 
G

Gavin Deane

Don said:
"For example, C++ code design, syntax, style, rules, bugs, etc."

I thought that my question was on topic, basically asking if there was
a c++ call to access a particular system parameter. If I was mistaken,
my apologies.

The key to understanding why that sort of question is off-topic is to
remember that C++ can be used to program a whole range of devices, much
wider than just desktop PCs. Any question that doesn't apply to all
platforms that C++ could be programmed for is probably off-topic. Your
question mentioned registrey keys and the Device Manager. These are
Windows concepts. Any solution that involves registrey keys and the
Device Manager will, by definition, be specific to Windows, which
automatically makes it off-topic.

Windows PCs, computers running Unix and Macs are all likely to have
various ports (serial, USB for example). Hypothetically, one could
imagine a C++ call available on all three platforms that allows you to
enumerate and use the available ports. Such a call would not be Windows
specific only but would be specific to the three platforms I mentioned,
so still off-topic.

HTH
Gavin Deane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top