public static extern NtStatus NtCreateEnlistment(
     out SafeKernelObjectHandle EnlistmentHandle,
     EnlistmentAccessRights DesiredAccess,
     SafeKernelObjectHandle ResourceManagerHandle,
     SafeKernelObjectHandle TransactionHandle,
     ObjectAttributes ObjectAttributes,
     EnlistmentCreateOptions CreateOptions,
     TransactionNotificationMask NotificationMask,
     IntPtr EnlistmentKey
     );
 /// <summary>
 /// Create a new enlistment object.
 /// </summary>
 /// <param name="object_attributes">The object attributes</param>
 /// <param name="desired_access">Desired access for the handle</param>
 /// <param name="resource_manager">Resource manager to handle the enlistment.</param>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="create_options">Optional create options.</param>
 /// <param name="notification_mask">Notification mask.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <returns>The created enlistment.</returns>
 public static NtEnlistment Create(
     ObjectAttributes object_attributes,
     EnlistmentAccessRights desired_access,
     NtResourceManager resource_manager,
     NtTransaction transaction,
     EnlistmentCreateOptions create_options,
     TransactionNotificationMask notification_mask,
     IntPtr enlistment_key
     )
 {
     return(Create(object_attributes, desired_access,
                   resource_manager, transaction,
                   create_options, notification_mask,
                   enlistment_key, true).Result);
 }
 /// <summary>
 /// Create a new enlistment object.
 /// </summary>
 /// <param name="object_attributes">The object attributes</param>
 /// <param name="desired_access">Desired access for the handle</param>
 /// <param name="resource_manager">Resource manager to handle the enlistment.</param>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="create_options">Optional create options.</param>
 /// <param name="notification_mask">Notification mask.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <param name="throw_on_error">True to throw an exception on error.</param>
 /// <returns>The created enlistment and NT status code.</returns>
 public static NtResult <NtEnlistment> Create(
     ObjectAttributes object_attributes,
     EnlistmentAccessRights desired_access,
     NtResourceManager resource_manager,
     NtTransaction transaction,
     EnlistmentCreateOptions create_options,
     TransactionNotificationMask notification_mask,
     IntPtr enlistment_key,
     bool throw_on_error
     )
 {
     return(NtSystemCalls.NtCreateEnlistment(out SafeKernelObjectHandle handle,
                                             desired_access,
                                             resource_manager.GetHandle(),
                                             transaction.GetHandle(),
                                             object_attributes,
                                             create_options,
                                             notification_mask,
                                             enlistment_key).CreateResult(throw_on_error, () => new NtEnlistment(handle)));
 }
Esempio n. 4
0
 /// <summary>
 /// Create an enlistment in this resource manager.
 /// </summary>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="notification_mask">Notification mask.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <returns>The created enlistment.</returns>
 public NtEnlistment CreateEnlistment(NtTransaction transaction,
                                      TransactionNotificationMask notification_mask, IntPtr enlistment_key)
 {
     return(CreateEnlistment(EnlistmentAccessRights.MaximumAllowed, transaction,
                             EnlistmentCreateOptions.None, notification_mask, enlistment_key, true).Result);
 }
Esempio n. 5
0
 /// <summary>
 /// Create an enlistment in this resource manager.
 /// </summary>
 /// <param name="desired_access">Desired access for the handle</param>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="create_options">Optional create options.</param>
 /// <param name="notification_mask">Notification mask.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <returns>The created enlistment.</returns>
 public NtEnlistment CreateEnlistment(EnlistmentAccessRights desired_access, NtTransaction transaction,
                                      EnlistmentCreateOptions create_options, TransactionNotificationMask notification_mask, IntPtr enlistment_key)
 {
     return(CreateEnlistment(desired_access, transaction,
                             create_options, notification_mask, enlistment_key, true).Result);
 }
Esempio n. 6
0
 /// <summary>
 /// Create an enlistment in this resource manager.
 /// </summary>
 /// <param name="desired_access">Desired access for the handle</param>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="create_options">Optional create options.</param>
 /// <param name="notification_mask">Notification mask.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <param name="throw_on_error">True to throw an exception on error.</param>
 /// <returns>The created enlistment and NT status code.</returns>
 public NtResult <NtEnlistment> CreateEnlistment(EnlistmentAccessRights desired_access, NtTransaction transaction,
                                                 EnlistmentCreateOptions create_options, TransactionNotificationMask notification_mask, IntPtr enlistment_key, bool throw_on_error)
 {
     return(NtEnlistment.Create(null, desired_access, this, transaction,
                                create_options, notification_mask, enlistment_key, throw_on_error));
 }