title: Parallel port with C#
body: <p>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..</p>
  
  <p>With the x64 dll when I send:</p>
  
  <pre><code>Output(888, 255);
  </code></pre>
  
  <p>It just continues the program as everything went ok, but i can't see anything on my multimeter (only the static 0.02V)..</p>
  
  <p>I also tried the following with C++:</p>
  
  <pre><code>int main () {
  int val = 0;
  printf("Enter a value\n");
  scanf("%d", &amp;val);
  _outp(0x378, val);
  getchar();
  _outp(0x378, 0);
  return 0; }
  </code></pre>
  
  <p>But it throws an exception:</p>
  
  <pre><code>Unhandled exception at 0x01281428 in ppac.exe: 0xC0000096: Privileged instruction.
  </code></pre>
  
  <p>I remember once I made something like this work on xp (C# not the C++ code), I hope it's possible on win7 too..
  Please help me with this.</p>
  
  <p>Thanks.</p>