private static NtResult <AuditPerUserCategory> GetPerUserCategoryInternal(Sid user, AuditPolicyEventType type, bool throw_on_error) { if (!SecurityNativeMethods.AuditLookupCategoryGuidFromCategoryId(type, out Guid category)) { return(NtObjectUtils.MapDosErrorToStatus().CreateResultFromError <AuditPerUserCategory>(throw_on_error)); } return(GetPerUserCategoryInternal(user, category, throw_on_error)); }