Example #1
0
 /// <summary>
 /// Get a list of all accessible enlistment objects owned by this resource manager.
 /// </summary>
 /// <param name="object_attributes">The object attributes</param>
 /// <param name="desired_access">The access for the enlistment objects.</param>
 /// <returns>The list of all accessible enlistment objects.</returns>
 public IEnumerable <NtEnlistment> GetAccessibleEnlistment(ObjectAttributes object_attributes, EnlistmentAccessRights desired_access)
 {
     return(NtTransactionManagerUtils.GetAccessibleTransactionObjects(
                Handle,
                KtmObjectType.Enlistment,
                id => NtEnlistment.Open(object_attributes, desired_access, this, id, false)));
 }
Example #2
0
 /// <summary>
 /// Create an enlistment in this resource manager.
 /// </summary>
 /// <param name="transaction">The transaction to enlist.</param>
 /// <param name="enlistment_key">Enlistment key returned during notification.</param>
 /// <returns>The created enlistment.</returns>
 public NtEnlistment CreateEnlistment(NtTransaction transaction, IntPtr enlistment_key)
 {
     return(CreateEnlistment(EnlistmentAccessRights.MaximumAllowed, transaction,
                             EnlistmentCreateOptions.None, NtEnlistment.GetDefaultMaskForCreateOption(EnlistmentCreateOptions.None),
                             enlistment_key, true).Result);
 }
Example #3
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));
 }