I've been trying to this application in Visual Studio 2010 to only write to the parallel port, so supposedly it would be a very easy task, and by all the tutorials in the internet i've seen before it really is! Although it throws me always the same error which is too generic and don't give enough information for me to solve it. I'm doing this using the "Inpout32.dll" library to make the communication between VB.NET and the port... If you guys know any other way, please tell me.
The code is basically this:
Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Even though this code is extremely simple it was supposed to work fine, but on clicking in the button i get this error:
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
SEHException was unhandled
External component has thrown an exception.
What i've tryed and didn't work:
- Used hexadecimal, binary an decimal for port address and data send.
- Verified if the port drivers and installation were ok.
- Tryed reading from the port (same error occurs).
Please guys, I don't know where else to search for this.