From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-27-2007 10:47 AM
09-28-2007 02:27 AM
@kmagas wrote:
I found one example that looks at the registry, however it does not work.
Hello,
Some time ago I wrote a small example program that finds the ports in the registry, thanks to a tip of Roberto. Is this the example that you are talking about? It works great on every system that I used it for...
09-28-2007 07:05 AM
Yes Wim that is the one. Doesnt work on my PC. See attached screenshot, I have the registry open showing Com 1 and 2.
09-28-2007 07:17 AM
09-28-2007 07:38 AM
09-28-2007 11:44 AM
Wim the problem was with the line with RegEnumerateValue. RegEnumerateValue was returning -57, buffer passed is too small for the operation. I put in a buffer instead of NULL values and it worked.
When I tried to run the exe on another PC I got errors about incompatable UIR versions, even after making an installation kit. So I modified your code so it does not need a UIR, attached is this modified c file. When I rund this on my laptop, it shows Com3 is available. However looking at the hardware configuration I found that on the laptop com 3 is not really a serial port it is used for a modem.
So apparently when CVI opens a port it using OpenCom or OpenComonfig it doesn't care if it is a serial port or a modem. Your code also has this issue.
09-28-2007 01:35 PM
09-29-2007 08:19 AM
10-02-2007 06:09 AM