I am trying to send data to LPT1 port using a C # program, unfortunately, without success. I use windows 7 x64. I tried dll x86 and x64 (inpoutx64.dll).
With x64 dll when sending:
Output(888, 255);
It just continues the program, as everything went fine, but I canβt see anything on my multimeter (only static 0.02 V).
I also tried the following with C ++:
int main () { int val = 0; printf("Enter a value\n"); scanf("%d", &val); _outp(0x378, val); getchar(); _outp(0x378, 0); return 0; }
But it throws an exception:
Unhandled exception at 0x01281428 in ppac.exe: 0xC0000096: Privileged instruction.
I remember, as soon as I did something like this work on xp (C #, and not on C ++ code), I hope that this is possible on win7 as well. Please help me with this.
Thanks.
source share