title: Cannot Initialize Kinect in Windows (0 sensors detected)
body: <p>I cannot initalize Kinect v1 in my Windows PC.</p>
  
  <p>This is my code (it builds successfully):</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;Ole2.h&gt;
  
  #include &lt;gl/GL.h&gt;
  #include &lt;gl/GLU.h&gt;
  #include &lt;gl/glut.h&gt;
  
  #include &lt;NuiApi.h&gt;
  #include &lt;NuiImageCamera.h&gt;
  #include &lt;NuiSensor.h&gt;
  
  #define width 640
  #define height 480
  
  // Kinect variables
  HANDLE rgbStream;              // The identifier of the Kinect's RGB Camera
  INuiSensor* sensor;            // The kinect sensor
  
  
  int main(int argc, char* argv[]) {
      // Get a working kinect sensor
      int numSensors=1;
      HRESULT reponse;
      reponse = NuiGetSensorCount(&amp;numSensors);
      if (reponse &lt; 0)  return false;
      if (numSensors &lt; 1) return false;
      if (NuiCreateSensorByIndex(0, &amp;sensor) &lt; 0) return false;
  
      // Initialize sensor
      sensor-&gt;NuiInitialize(NUI_INITIALIZE_FLAG_USES_DEPTH | NUI_INITIALIZE_FLAG_USES_COLOR);
      sensor-&gt;NuiImageStreamOpen(
          NUI_IMAGE_TYPE_COLOR,            // Depth camera or rgb camera?
          NUI_IMAGE_RESOLUTION_640x480,    // Image resolution
          0,        // Image stream flags, e.g. near mode
          2,        // Number of frames to buffer
          NULL,   // Event handle
          &amp;rgbStream);
      return sensor;
  }
  </code></pre>
  
  <p>The problem is that the function "NuiGetSensorCount" returns always that the number of sensors is 0.</p>
  
  <p>The Kinect 1 is plugged in to the PC through the USB port (I've tried in different ports); and the curious thing is that, if I run software like Skanect (1.8 Win64), Skanect recognizes the device (it's detected as OpenNI 2 Sensor) and I'm able to use it.</p>
  
  <p>I'm using Visual Studio 2013 Update 5, in Windows 7 64-bit.
  I have installed OpenNI 64-bit 2 drivers and Kinect for Windows SDK v1.8.</p>
  
  <p>In my project properties, I am calling the Kinect10.lib library located at:</p>
  
  <ul>
  <li>C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\x86</li>
  <li>C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64</li>
  </ul>
  
  <p>(I've tried in both x86 and x64 configurations)</p>
  
  <p>Likewise, for each configurationI've tried using the Kinect10.dll binaries located at:</p>
  
  <ul>
  <li>C:\Windows\System32</li>
  <li>C:\Windows\SysWOW64</li>
  </ul>
  
  <p>Any comments/suggestions are greatly welcomed.
  Also, if I have missed some information you think is relevant, please let me know.</p>
  
  <p>Thanks in advance.</p>