I don\'t get any error or exception.
Button in one Window:
private void button1_Click(object sender, EventArgs e)
{
ControlPort.Output(0x378, 0xf
I resolved a problem with LPT port on Windows 2000 on my old laptop, where the data port (pin2-pin9) could not be set.
Using this imported function:
[DllImport("inpout32.dll", EntryPoint = "Out32")]
public static extern void Out32(int address, int value);
after every reboot or restart of Windows I have to call this line:
Out32(0x378 + 2, 0x00);
so that the port works properly. I think the problem is in the bi-directional settings (control port at 6th bit on 0x37A).