public static extern NtStatus NtOpenEnlistment(
     out SafeKernelObjectHandle EnlistmentHandle,
     EnlistmentAccessRights DesiredAccess,
     SafeKernelObjectHandle ResourceManagerHandle,
     ref Guid EnlistmentGuid,
     ObjectAttributes ObjectAttributes
     );
 /// <summary>
 /// Get a list of all accessible enlistment objects owned by this resource manager.
 /// </summary>
 /// <param name="desired_access">The access for the enlistment objects.</param>
 /// <returns>The list of all accessible enlistment objects.</returns>
 public IEnumerable <NtEnlistment> GetAccessibleEnlistment(EnlistmentAccessRights desired_access)
 {
     return(NtTransactionManagerUtils.GetAccessibleTransactionObjects(
                Handle,
                KtmObjectType.Enlistment,
                id => NtEnlistment.Open(null, desired_access, this, id, false)));
 }
 public static extern NtStatus NtCreateEnlistment(
     out SafeKernelObjectHandle EnlistmentHandle,
     EnlistmentAccessRights DesiredAccess,
     SafeKernelObjectHandle ResourceManagerHandle,
     SafeKernelObjectHandle TransactionHandle,
     ObjectAttributes ObjectAttributes,
     EnlistmentCreateOptions CreateOptions,
     TransactionNotificationMask NotificationMask,
     IntPtr EnlistmentKey
     );
Beispiel #4
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);
 }
Beispiel #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>
 /// <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));
 }
Beispiel #6
0
 /// <summary>
 /// Get a list of all accessible enlistment objects owned by this resource manager.
 /// </summary>
 /// <param name="desired_access">The access for the enlistment objects.</param>
 /// <returns>The list of all accessible enlistment objects.</returns>
 public IEnumerable <NtEnlistment> GetAccessibleEnlistment(EnlistmentAccessRights desired_access)
 {
     return(GetAccessibleEnlistment(null, desired_access));
 }