Parallel port with C#
Posted
by Michael S.
on Stack Overflow
See other posts from Stack Overflow
or by Michael S.
Published on 2010-05-30T21:18:20Z
Indexed on
2010/05/30
21:22 UTC
Read the original article
Hit count: 587
Hello, I am trying to send data to LPT1 port with a C# program, unfortunately with no success.. I am using windows 7 x64. I tried both x86 and x64 (inpoutx64.dll) dll's..
With the x64 dll when I send:
Output(888, 255);
It just continues the program as everything went ok, but i can't see anything on my multimeter (only the static 0.02V)..
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 once I made something like this work on xp, I hope it's possible on win7 too.. Please help me with this.
Thanks.
© Stack Overflow or respective owner