AnsweredAssumed Answered

vrf Available serial ports

Question asked by VRFuser on Jan 21, 2008
> We'll see what they say.

Hopefully it's a known issue & they can take care of it right away. I can't really think of anything off the top of my head that happened to XP's serial handling with SP2, but then there are *so* many things.

> Unfortunately, I think the GreenLeaf
> Open() code has a problem and it is
> occurring both when I test for
> available ports and also when I open
> a port for real.

Probably. You know, it's not too terribly awful hard to use the raw API to test availability of ports. All you really need to do is call CreateFile with a filename parameter of \.COMxx and see if INVALID_HANDLE_VALUE is returned. If not, call CloseHandle on the returned value and note that the port is available. You can check a huge range of ports very fast. This will work for ports from COM1 to COM9999.

In fact, you can probably adapt GetDevices to do what you want. This will give you all COM ports pretty fast. If you change it to test only COM ports or filter the results for only COM ports before it tests availability it'll be even faster. It took an AMD 2.07GHz 4 seconds to return the names & accessibility status of 193 devices. This is much, MUCH faster than any ActiveX equivalent would be for the same info.

GetDevices is in RWilson3.vee:

Naturally I have to say that at the time (2004) the comments I made about Linux were on the verge of becoming history with the new kernel release.
Linux does dynamic drivers now. We generally don't care I know, but there are probably some Linux fans that will point this out. And I wouldn't want to get Linus POed at me! The dude can be brutal

You are currently subscribed to vrf as: To subscribe please send an email to: "" with the word subscribe in the message body.
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".
Search the "unofficial vrf archive" at "".
Search the Agilent vrf archive at "".