May 06, 2024, 05:49:39 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Com port description / name

Started by Andy, April 26, 2015, 05:29:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Sorry to ask another question but...

I have at times 2 com ports connected to my PC

one is for LPT1 & one for my USB to serial device.

I can enumerate how many com ports are open e.g. 2, and the com port numbers for each.

But is there a way to get the "Description" of what each com port is there for?

At the moment, I can't buy the com add-on for IWB, so is there a way to do this without it....

Thanks,
Andy.

:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Only way I can think of is to open Windows' Device manager, and check if the drivers has assigned names to the external devices.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

Andy,

I don't have have any COM ports, but does this work for you?

Brian

Andy

Thanks Egil and Brian for your suggestions.

I have managed to do it - see attached code.

You must use the attached "Registry.inc" file.

Any problems compiling / running please let me know.

However, it must be run on a user account that is an Administrator type account.

I was just wondering if there was a way to get the same details is you were a standard user.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

ckoehn

Adding this manifest file to your projects lets your program run, even if it isn't started with administrator privliges.

It opens 2 console windows for some reason... :-\

Later,
Clint

Andy

Thanks,

I downloaded the manifest file, saved it into the same folder as the program but it didn't make a difference
for me.

I'm on Win7 32 bit. (User account controls are off).

Thanks anyway.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

ckoehn

I think I had to actually include it in a "project" resource file for it to work for me.  Not sure what the difference is.

Here is the resouce file I used.

Later,
Clint

Brian

April 28, 2015, 09:58:02 AM #7 Last Edit: April 28, 2015, 12:07:55 PM by Brian Pugh
Clint,

if you don't include it as a resource, I suppose the manifest file would have to be
named exactly the same as the exe file it is paired with

Brian

Silly Me! Just checked the filename, and it was OK!