public static EnlistmentHandle Create( EnlistmentAccess access, string name, ObjectFlags objectFlags, DirectoryHandle rootDirectory, ResourceManagerHandle resourceManagerHandle, TransactionHandle transactionHandle, EnlistmentOptions createOptions, NotificationMask notificationMask, IntPtr enlistmentKey ) { ObjectAttributes oa = new ObjectAttributes(name, objectFlags, rootDirectory); IntPtr handle; try { Win32.NtCreateEnlistment( out handle, access, resourceManagerHandle, transactionHandle, ref oa, createOptions, notificationMask, enlistmentKey ).ThrowIf(); } finally { oa.Dispose(); } return(new EnlistmentHandle(handle, true)); }
internal CurrentTransactionContext(TransactionHandle handle) { _oldHandle = GetCurrent(); SetCurrent(handle); _disposed = false; }
public static CurrentTransactionContext SetCurrentContext(TransactionHandle transactionHandle) { return(new CurrentTransactionContext(transactionHandle)); }
public static void SetCurrent(TransactionHandle transactionHandle) { Win32.RtlSetCurrentTransaction(transactionHandle ?? IntPtr.Zero); }