private static IntPtr Create(Context context, Query query, EnumerationErrors errors)
        {
            IntPtr handle;
            UInt32 status = OpenNIImporter.xnCreateIRGenerator(context.InternalObject, out handle,
                                                               query == null ? IntPtr.Zero : query.InternalObject,
                                                               errors == null ? IntPtr.Zero : errors.InternalObject);

            WrapperUtils.CheckStatus(status);
            return(handle);
        }