Guidance Needed -- Application and Serial Printer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using VB.net and Windows 2000.

Have a main application that occasionally needs to send data to a serial
printer. Need bi-directional communication with the printer to show when it
goes offline, out of paper, etc.

I am thinking that this needs two EXE programs so that the main application
does not get bogged down while the serial printer is printing. Will then run
on separate threads.

What is the best way to communicate between two EXE's running on the same
computer?

Is this the right approach?

Thanks for your help.
 
For interprocess communications, you can use the Semaphore and Mutex classes
within the Sytem.Threading namespace of the FCL.
 
Hi,
Have a main application that occasionally needs to send data to a serial
printer. Need bi-directional communication with the printer to show when it
goes offline, out of paper, etc.
<<

Can you install this printer as a standard Windows printer (with its own
driver)? If so, then the Windows Print Spooler will take care of all of
this work for you.

If there is no Windows driver available for it, then writing a threaded
object (this doesn't need to be a separate application) would be straight
forward. The only trick is to determine the actual protocol that the
printer uses to indicate the offline and out-of-paper (and error) states.
The actual code after that is probably less than 50 lines (for example, you
could use the DesktopSerialIO dll from my homepage for the serial interface
itself).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Back
Top