Hi Jan,
I am facing the same problem. inpout32.dll works great on win xp. but when i try to use it on windows7 32 bit machine, it gives no error. Ideally it should open port for communication and the shutter attached to it should flicker. That flickering of shutter does not happen.
i tried writing data to the parallel port ECP Printer Port(LPT1 ) at 0x378.
when i try reading back the data it gives back 120 value for any input.
for example if i write 24 on the parallel port, it returns back 120
even if i write 10, it returns 120.
Please guide me, as to how to solve it.
Following is my sample code:-
class Program
{
/// <summary>
/// This method will be used to send the data out to the parallel port.
/// </summary>
/// <param name="adress">Address of the port to which the data needs to be sent.</param>
/// <param name="value">Data that need to send out.</param>
[DllImport("inpout32.dll", EntryPoint = "Out32")]
public static extern void Output(int address, int value);
/// <summary>
/// This method will be used to receive any data from the parallel port.
/// </summary>
/// <param name="address">Address of the port from which the data should be received.</param>
/// <returns>Returns Integer read from the given port.</returns>
[DllImport("inpout32.dll", EntryPoint = "Inp32")]
public static extern int Input(int address);
static void Main(string[] args)
{
int address = 0x378;
int value = 24;
Program.Output(address, value);
//int address = 888;
Program.Output(address, 10);
int value1;
value1 = Program.Input(address);
Console.WriteLine("value1=" + value1);
Console.ReadLine();
}