Visual Basic and Parallel Port (read/write)

I have visual Basic and i want to read /write to parallel port. TO Pscal was eisy using Port[] command but i don't know how i write byte or read byte to parallel. If you know haw i read/write to parallel ask me.
tzelveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DalinCommented:
tzelve,
VB does not have a control that communicate to the parallel port directly similar to  MSComm to serial port. So it is not a easy task. There may be 3rd party control available, but I have not seen one yet.

               If you would like to exploring low level communication to parallel port,  you can find useful information in :
                   http://www.doc.ic.ac.uk/~ih/doc/par/
                   http://www.senet.com.au/~cpeacock/parallel.htm
                   http://et.nmsu.edu/~etti/fall96/computer/printer/printer.html
                 Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe_GriffithCommented:
You can communicate to a parallel port directly just like a file:

  Dim fn As Integer
  fn = FreeFile
  Open "lpt1:" For Output As fn
  Print #fn, "Hello"
  Print #fn, vbFormFeed
  Close #fn
0
DalinCommented:
In the above method, you are not communicate to the port itself. Rather, you are communicate with the printer driver set in the port.
You send the data to the driver and the driver translate into low lever command.  You  can not read or write bytes data to the port with that method.

VB does not support write to a memory address like the old GWBasic in which you can Poke a byte.
0
kfrickCommented:
I have used the following DirectIO .dll to communicate directly with the Parallel Port Chip. You must know the address of the chip, and how it operates, to have the chip control the Port as you require.

DirectIO dDriver DLL available at:
http://www.advantech.com/support/down_dir.htm

It is intended for use with their products, but it also works for the Parallel Port.....

Good Luck!

-kf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.