/// <summary> /// Create a new transaction manager object. /// </summary> /// <param name="path">The path to the transaction manager.</param> /// <param name="root">The root if path is relative.</param> /// <param name="desired_access">Desired access for the handle</param> /// <param name="log_filename">The CLFS log file to create if not volatile.</param> /// <param name="create_options">Creation options flags.</param> /// <returns>The object result.</returns> public static NtTransactionManager Create(string path, NtObject root, TransactionManagerAccessRights desired_access, string log_filename, TransactionManagerCreateOptions create_options) { return(Create(path, root, desired_access, log_filename, create_options, true).Result); }
public static extern NtStatus NtCreateTransactionManager( out SafeKernelObjectHandle TmHandle, TransactionManagerAccessRights DesiredAccess, ObjectAttributes ObjectAttributes, UnicodeString LogFileName, TransactionManagerCreateOptions CreateOptions, int CommitStrength );
/// <summary> /// Create a new transaction manager object. /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">Desired access for the handle</param> /// <param name="log_filename">The CLFS log file to create if not volatile.</param> /// <param name="create_options">Creation options flags.</param> /// <param name="commit_strength">Commit strength, set to 0.</param> /// <returns>The object result.</returns> public static NtTransactionManager Create(ObjectAttributes object_attributes, TransactionManagerAccessRights desired_access, string log_filename, TransactionManagerCreateOptions create_options, int commit_strength) { return(Create(object_attributes, desired_access, log_filename, create_options, commit_strength, true).Result); }
/// <summary> /// Create a new transaction manager object. /// </summary> /// <param name="path">The path to the transaction manager.</param> /// <param name="root">The root if path is relative.</param> /// <param name="desired_access">Desired access for the handle</param> /// <param name="log_filename">The CLFS log file to create if not volatile.</param> /// <param name="create_options">Creation options flags.</param> /// <param name="throw_on_error">True to throw an exception on error.</param> /// <returns>The object result.</returns> public static NtResult <NtTransactionManager> Create(string path, NtObject root, TransactionManagerAccessRights desired_access, string log_filename, TransactionManagerCreateOptions create_options, bool throw_on_error) { using (var obj_attr = new ObjectAttributes(path, AttributeFlags.CaseInsensitive, root)) { return(Create(obj_attr, desired_access, log_filename, create_options, 0, throw_on_error)); } }
/// <summary> /// Create a new transaction manager object. /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">Desired access for the handle</param> /// <param name="throw_on_error">True to throw an exception on error.</param> /// <param name="log_filename">The CLFS log file to create if not volatile.</param> /// <param name="create_options">Creation options flags.</param> /// <param name="commit_strength">Commit strength, set to 0.</param> /// <returns>The NT status code and object result.</returns> public static NtResult <NtTransactionManager> Create(ObjectAttributes object_attributes, TransactionManagerAccessRights desired_access, string log_filename, TransactionManagerCreateOptions create_options, int commit_strength, bool throw_on_error) { return(NtSystemCalls.NtCreateTransactionManager(out SafeKernelObjectHandle handle, desired_access, object_attributes, log_filename.ToUnicodeString(), create_options, commit_strength).CreateResult(throw_on_error, () => new NtTransactionManager(handle))); }