Пример #1
0
 /// <summary>
 /// Method to create an object from a set of object attributes.
 /// </summary>
 /// <param name="obj_attributes">The object attributes to create/open from.</param>
 /// <returns>The newly created object.</returns>
 protected override object CreateObject(ObjectAttributes obj_attributes)
 {
     if (ParameterSetName == "All")
     {
         return(ResourceManager.GetAccessibleEnlistment(obj_attributes, Access));
     }
     return(NtEnlistment.Open(obj_attributes, Access, ResourceManager, EnlistmentGuid));
 }
        /// <summary>
        /// Method to create an object from a set of object attributes.
        /// </summary>
        /// <param name="obj_attributes">The object attributes to create/open from.</param>
        /// <returns>The newly created object.</returns>
        protected override object CreateObject(ObjectAttributes obj_attributes)
        {
            if (NotificationMask == 0)
            {
                NotificationMask = NtEnlistment.GetDefaultMaskForCreateOption(CreateFlags);
            }

            return(NtEnlistment.Create(obj_attributes, Access, ResourceManager, Transaction, CreateFlags, NotificationMask, EnlistmentKey));
        }