Esempio n. 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)
        {
            Options |= FileOpenOptions.OpenReparsePoint;

            using (NtFile file = (NtFile)base.CreateObject(obj_attributes))
            {
                if (Bytes)
                {
                    return(file.GetReparsePointRaw());
                }
                return(file.GetReparsePoint());
            }
        }