Search code examples
c++kinect

How to access 'WindowsPreview' namespace?


I am trying to work with a kinect 2 in c++. All the code samples I have seen use the WindowsPreview namespace but I don't seem to have access to it. I have the SDK (code samples run fine). I have correctly linked to the Kinect.h and kinect20.lib files. Can someone help me out?

example of the error


Solution

  • WindowsPreview::Kinect is the namespace when using the Kinect API for the Windows Store, the other APIs use Microsoft::Kinect.

    Found a mention of the namespaces in one of the videos: Kinect Data Sources and Programming Model (starts at 20:00)

    Rob: In the store APIs, the namespace is WindowsPreview.Kinect?
    Jesse: (Yes)
    Rob: Can you talk about the other APIs?
    Jesse: In the other APIs, the namespace is Microsoft.Kinect, the WindowsPreview namespace is indicating that we are previewing the WinRT APIs for further inclusion in some form of Windows down the road.

    It appears to be listed as WindowsPreview.Kinect in the documentation but in my code (not targetting the Windows store) it shows up as Microsoft.Kinect:enter image description here In my opinion, this is something that could be more clearly documented, but it is possible I'm just not looking in the right places.