Question Parallel Port Interface

Joined
Sep 15, 2011
Messages
17
Programming Experience
3-5
Hello dear Forum,

I have a problem interfacing with the Parallel Port.
I have tried using the "inpout32.dll" to communicate with the port, but it didn't work for me.

I have used another program (coded in C++), and I have successfully read the S-port-data - and that's what I mainly need the application for.

Do you guys have an "easy" way to interface with the Parallel Port using VB .Net?
I don't want to use C++.... :ambivalence:

Thanks in advance, Martin.
 
The .NET Framework contains a class for interacting with a serial port because serial ports are still fairly widely used for connecting electronic devices but parallel ports are all but dead so there's no corresponding class in the Framework. As such, there is no "simple", i.e. managed, way to interact with a parallel port in .NET. Keep in mind that the .NET SerialPort class is just a wrapper for API calls itself, so maybe you could create a similar ParallelPort class yourself.

How to access serial and parallel ports by using Visual Basic .NET
 
I have tried that one too, but I could not get the "MSComm" to work...
Could I possibly use "System.IO.Ports.SerialPorts" to read/write data to/from the Parallel Port?
 
Could I possibly use "System.IO.Ports.SerialPorts" to read/write data to/from the Parallel Port?
No, as the name suggest SerialPort class is for serial ports only, it will not work for parallel ports.

Curiously, I just recently noticed new computers often don't have parallel ports anymore, though this started happening even back in 2005.
 
I have tried that one too, but I could not get the "MSComm" to work...
It says on that page that MSComm is for serial ports. Have you tried the option on that page that actually says that it's for parallel ports?

You're going to have to accept the fact that there is no "easy" way to work with a parallel port in .NET. There are options that obviously work so, if they don't work for you, you must be doing something wrong. If you don;t show us what you tried and tell us what happened then we can't help you fix your mistakes.
 
Back
Top