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