473,473 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Querying serial ports device information. Getting "unfriendly" identifier


I want to fill a list box with the "friendly" names for the serial ports
installed on a system, yet I also need to query the names required to
connect to that port.
ie I enumerate the friendly names of the Ports using the
SetupDiGetDeviceRegistryProperty api call passing SPDRP_FRIENDLYNAME to get
the friendly name "Prolific USB-to-Serial Comm Port (COM3)", but I also need
to know how to get the "COM3" part on its own.
I tried changing the SPDRP_FRIENDLYNAME to several other possible
parameters available to that api call but didn't get "COM3" from any of
them.

SetupDiGetDeviceRegistryProperty(NewDeviceInfoSet,
DeviceInfoData,
SPDRP_FRIENDLYNAME,
0,
DeviceName,
MAX_DEV_LEN,
IntPtr.Zero) )
Nov 16 '05 #1
1 4067
S'ok. Found some code samples on The Code Project
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Duke Hamacher | last post by:
Hello: This title is a little ambiguous but this is an interesting puzzle. Lets's say we have a JSP page with a form. The ActionForm associated with this form has, say, 4 String properities. ...
3
by: Lars Schlanbusch | last post by:
Hi! Is there any way to set <base target="_blank"> for links which link to a page outside the domain, and <base target="_self"> for links which link to a page inside the domain? Can i do such...
11
by: David | last post by:
Comments on a program called PHP Page Generator? ( http://www.phppagegenerator.com) I received a email offer of $100 and the product appears to allow quick generation of code for SQL web...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
16
by: jose_luis_fdez_diaz_news | last post by:
Hi, If I don't include <libgen.h> I get then warnig below in regcmp call: warning: improper pointer/integer combination: op "=" but if I include it the warning is not shown, but them program...
8
by: Ian Davies | last post by:
Hello I have the following sql string to run as a command in my VB6 project to update mysql table strSQL = "LOAD DATA INFILE " & ImportFile & " INTO TABLE tPupils FIELDS TERMINATED BY ','...
9
by: Tristán White | last post by:
Hi I am very new to PHP - actually, this is my second day at it, as I've only recently started a new job last week. We're a charity. I have a "No input file selected" problem. A Google search...
8
by: kaili | last post by:
i'm chinese i heard that "The C Programming Language " by Brian W. Kernighan, Dennis Ritchie is the best book for new learners. but it is unavailable here. i mearn there is nobody selled it. i...
5
by: emsik1001 | last post by:
Hi I have a few combo boxes where the match is required. When I select a value and then delete it and go to another control then I get very user unfriendly message "invalid property value". ...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.