Check quickly for AVAILABLE ports(Read 7079 times)
Check quickly for AVAILABLE ports on: November 14, 2009, 01:57:44 AM
I find that using your OCX (that I just bought), the CountPorts value reports *ALL* ports on a computer.  I need to know which ports are not already in use.  In attempts to resolve this, I tried to open each port to see if failure (which would indicate NOT AVAILABLE).  That SEEMS to work, however, if the open is successful, I need to close it before attempting the next port and that takes a VERY LONG TIME.  In checking only 6 ports, the time is about 3 seconds.  Since I am loading a combobox ( 2003) on 'click', the drop down is delayed by 3+ seconds.  This is obviously unacceptable.  Since I am using more than one port and the user can select the specific port according to how he connected them, I need this dynamic test for ports available on each comboclick.  How can I get this done in a reasonable time frame?  Is there a better (quicker) way to test for port AVAILABLE?

Re: Check quickly for AVAILABLE ports Reply #1 on: November 17, 2009, 08:57:19 AM

We would recommend you to open the COM port like a file:


In this case the threads of events expectations will not be initialized.


Sitemap 1 2 3 4 5