title: WDK (Windows Driver Kit) and VC++ headers problem
body: <p>I'm trying to read from an USB HID device, I know how to do it in C# using DLLImport hid.dll, but I want to do it from C++, this way I don't have to declare all the structures, etc, and just include the headers files. </p>
  
  <p>So I downloaded the <a href="http://www.microsoft.com/whdc/ddk/winddk.mspx" rel="nofollow noreferrer">WDK</a> and then when including the headers files and linking the libraries I'm getting a lot of errors:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  
  extern "C" {
      #include &lt;hidsdi.h&gt;
  }
  
  int main(){
  
  }
  </code></pre>
  
  <p>Errors (6 out of 163):</p>
  
  <pre><code>Error   1   error C2065: 'PASSIVE_LEVEL' : undeclared identifier    c:\winddk\7600.16385.1\inc\api\hidpi.h  302 driver
  Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
  Error   3   error C2146: syntax error : missing ';' before identifier 'NTSTATUS'    c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
  Error   4   error C2143: syntax error : missing ';' before '__stdcall'  c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
  Error   5   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
  Error   6   error C2377: 'NTSTATUS' : redefinition; typedef cannot be overloaded with any other symbol  c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
  </code></pre>
  
  <p>OK so I read somewhere that I have to upgrade the Windows SDK too, I had the Microsoft Windows SDK v6.0A, I downloaded and installed the windows SDK v7.0. But then looks like I have two SDK now? How I properly do the SDK upgrade in visual studio?</p>
  
  <p>I very much appreciate your help,</p>
  
  <p>Thanks,
  Carlos</p>