ActiveX Controls for Serial Devices - Port Contention 
Author Message
 ActiveX Controls for Serial Devices - Port Contention

I have written several ActiveX controls for various Serial devices.  These
controls were originally intended to run in a VB client or IE Client side,
So Port contention was not really an issue.
I now have the need to run some of these controls in ASP files on an IIS
server.  My question is this, What is my best approach for dealing with
"port contention".  My controls work fine if there is only one client
request at a time. When the request comes in I open the Port send the
command wait for the return and close the port (this only takes a fraction
of a second ).  If, However, multiple requests came in at the same time the
control will return a valid response to the first client and an error code
that the port was already opened to subsequent clients.

I'd like to setup some sort of queue so that I can make requests queue up
until the port is available.

Any suggestions would be appreciated.

Paul Deignan

Mon, 27 Sep 2004 00:11:19 GMT  
 ActiveX Controls for Serial Devices - Port Contention

I have example code for this in my book (example called CommShare.vbp).  It
is an ActiveX EXE (callable from ASP) that "attempts" to handle sharing and
contention.  Actually, I have no idea if it is close to "best."  It is the
one and only attempt that I made.  I am certain that there are improvements
that might be made.

Richard Grier  (Microsoft Visual Basic MVP)

See for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.

Mon, 27 Sep 2004 01:07:34 GMT  
 [ 2 post ] 

 Relevant Pages 

1. ActiveX Controls for Serial Devices - Port Contention

2. vb5 &controlling devices via serial ports

3. Serial Port and Device Control Block Help

4. Talking to external devices via Serial Port (MSCOM.OCX)

5. Efficient handling of strings from serial port device?

6. How to loop comm port control to read text files through serial port in VB3

7. I/O port, Parallel port, Serial port

8. Controlling external device on parallel port

9. Using Parallel Port I/O to control external devices

10. qb45 and SERIAL strange SERIAL port protocol

11. serial printer on serial port

12. serial printer on serial port


Powered by phpBB® Forum Software