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.
:)
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
Andy,
I don't have have any COM ports, but does this work for you?
Brian
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.
:)
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
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.
:)
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
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!