Kinect for Windows 1.5, 1.6, 1.7, 1.8Creates an instance of the Kinect sensor with the specified index so that an application can open and use it.
Returns S_OK if successful; otherwise, returns one of the failure codes in the following table.
|E_OUTOFMEMORY||The allocation failed.|
|E_POINTER||The hNextFrameEvent parameter is an invalid handle.|
|This function supports applications that use more than one Kinect sensor. Applications that use only one sensor do not need an INuiSensor interface, and should use the functions in NuiApi.h, NuiImageCamera.h, and NuiSkeleton.h.|
Applications that support more than one Kinect sensor call NuiCreateSensorByIndex to access the second and subsequent devices. This function returns a pointer to an INuiSensor interface, which provides functions that are identical to those in NuiApi.h, NuiImageCamera.h, and NuiSkeleton.h, but operate on a particular device instance.