We will show how to create and initialize a context object in C++ and how to use the
openni::Status datatype to handle errors thrown by OpenNI core. We will use
openni::Status very often in the later recipes and it is a very important part of any successful application.
In this recipe, we try to show the version number of the current OpenNI environment and then initialize the OpenNI framework. This will ask OpenNI to search for any connected device and load their modules and drivers.
Create a project in Visual Studio 2010 and prepare it for working with OpenNI using the Creating a project in Visual Studio 2010 recipe in this chapter.
Have a look at the following steps: