Beispiel #1
0
 internal static NtResult <NtObject> FromName(ObjectAttributes object_attributes, AccessMask desired_access, bool throw_on_error)
 {
     return(Open(object_attributes, desired_access.ToSpecificAccess <WindowStationAccessRights>(), throw_on_error).Cast <NtObject>());
 }
 internal static NtResult <NtObject> FromName(ObjectAttributes object_attributes, AccessMask desired_access, bool throw_on_error)
 {
     return(Open(object_attributes, desired_access.ToSpecificAccess <TransactionManagerAccessRights>(),
                 null, null, TransactionManagerOpenOptions.None, throw_on_error).Cast <NtObject>());
 }
 /// <summary>
 /// Duplicate object.
 /// </summary>
 /// <param name="access_rights">Access rights to duplicate with.</param>
 /// <param name="flags">Attribute flags.</param>
 /// <param name="options">Duplicate options</param>
 /// <param name="throw_on_error">True to throw an exception on error.</param>
 /// <returns>The duplicated object.</returns>
 public sealed override NtResult <NtObject> DuplicateObject(AccessMask access_rights, AttributeFlags flags, DuplicateObjectOptions options, bool throw_on_error)
 {
     return(Duplicate(access_rights.ToSpecificAccess <A>(), flags, options, throw_on_error).Cast <NtObject>());
 }
 public sealed override NtResult <NtObject> Open(ObjectAttributes obj_attributes, AccessMask desired_access, bool throw_on_error)
 {
     return(OpenInternal(obj_attributes, desired_access.ToSpecificAccess <A>(), throw_on_error).Cast <NtObject>());
 }
Beispiel #5
0
        /// <summary>
        /// Convert a file access rights mask to a directory file access mask.
        /// </summary>
        /// <param name="access">The access to convert.</param>
        /// <returns>The converted access rights.</returns>
        public static FileDirectoryAccessRights ToDirectoryAccessRights(this FileAccessRights access)
        {
            AccessMask mask = access;

            return(mask.ToSpecificAccess <FileDirectoryAccessRights>());
        }