title: NuiApi.h include failed in Visual Studio 2012 DLL project
body: <p>I tried to make console application that is using my DLL that is taking care of Kinect. 
  When I am building my project I get:</p>
  
  <p><strong>2>e:\projects\c++\vs\kinect dll\consoleapplication1\consoleapplication1.cpp(4): 
  warning C4627: '#include "KinectDLL.h"': skipped when looking for precompiled header use
  2> Add directive to 'stdafx.h' or rebuild precompiled header
  2> e:\michał\projects\c++\vs\kinect dll\kinect dll\depthreader.h(4): 
  fatal error C1083: Cannot open include file: <em>'NuiApi.h': No such file or directory</em></strong></p>
  
  <p>Note: ConsolApplication1 and Kinect DLL are 2 projects in the same solution, first one have one dependency – Kinect DLL project as DLL. I have “use precompile headers” turned off in both projects!</p>
  
  <p><strong>Kinect DLL projects:</strong></p>
  
  <p>KinectDLL.h:</p>
  
  <pre><code>#ifdef KINECTDLL_EXPORTS
  #define KINECTDLL_API __declspec(dllexport) 
  #else
  #define KINECTDLL_API __declspec(dllimport) 
  #endif
  </code></pre>
  
  <p>DepthReader.h:</p>
  
  <pre><code>#pragma once
  #include &lt;ole2.h&gt;
  #include &lt;Windows.h&gt;
  #include "NuiApi.h"
  #include "KinectDLL.h"
  
  namespace KinectDLL{
  
      class DepthReader{
  
          static KINECTDLL_API const int        depthWidth  = 640;
          static KINECTDLL_API const int        depthHeight = 480;
          static KINECTDLL_API const int        bytesPerPixel = 4;
      public:
          KINECTDLL_API DepthReader(void);
          KINECTDLL_API ~DepthReader(void);
  
          KINECTDLL_API int Run(HINSTANCE hInstance, int nCmdShow);
      private:
          HANDLE depthStreamHandle;
          HANDLE nextDepthFrameEvent;
          HANDLE depthStream;
          BYTE* depthRGBX;
          bool nearMode;
          INuiSensor* sensor;
          //HWND m_hWnd;
          HRESULT CreateFirstConnected();
          void Update();
          void ProcessDepth();
      };
  }
  </code></pre>
  
  <p>DepthReader.cpp</p>
  
  <pre><code>#include "stdafx.h"
  #include "DepthReader.h"
  namespace KinectDLL{
      DepthReader::DepthReader(void) :
          nextDepthFrameEvent(INVALID_HANDLE_VALUE),
          depthStreamHandle(INVALID_HANDLE_VALUE),
          nearMode(false),
          sensor(NULL)
      {
          // create heap storage for depth pixel data in RGBX format
          depthRGBX = new BYTE[depthWidth*depthHeight*bytesPerPixel];
      }
  </code></pre>
  
  <p>… and so on, mostly copy and pase from MS Kinect examples...</p>
  
  <p>Consoleapplication1 project:</p>
  
  <p>Consolapplication1.cpp:</p>
  
  <pre><code>#include "KinectDLL.h"
  #include "stdafx.h"
  #include "Rotations.h"
  #include "Camera.h"
  #include "FileLoader.h"
  #include "DepthReader.h"
  
  using namespace std;
  
  Camera camera;
  Rotations rotations;
  FileLoader fileLoader;
  KinectDLL::DepthReader depthReader;
  </code></pre>
  
  <p>… then there is OpenGL, points from file. I am using Kinect to contole the scene, not to display data from it. No depthReader for now.</p>
  
  <p><strong>Clearly I am doing something <em>stupid</em> but I can't see what.</strong> I am reading Microsoft examples about DLL in VC++ but I can't see what is wrong.</p>