Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0] Fix TransactionInterop.GetDtcTransaction() #74821

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ namespace System.Transactions.DtcProxyShim.DtcInterfaces;
[ComImport, Guid(Guids.IID_ITransaction), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface ITransaction
{
void Commit([MarshalAs(UnmanagedType.Bool)] bool fRetainingt, [MarshalAs(UnmanagedType.U4)] OletxXacttc grfTC, uint grfRM);
void Commit(
[MarshalAs(UnmanagedType.Bool)] bool fRetainingt,
[MarshalAs(UnmanagedType.U4)] OletxXacttc grfTC,
uint grfRM);

void Abort(IntPtr reason, [MarshalAs(UnmanagedType.Bool)] bool retaining, [MarshalAs(UnmanagedType.Bool)] bool async);
void Abort(
IntPtr reason,
[MarshalAs(UnmanagedType.Bool)] bool retaining,
[MarshalAs(UnmanagedType.Bool)] bool async);

void GetTransactionInfo(out OletxXactTransInfo xactInfo);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,17 @@ namespace System.Transactions.DtcProxyShim.DtcInterfaces;
[ComImport, Guid("02656950-2152-11d0-944C-00A0C905416E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface ITransactionCloner
{
void Commit(
[MarshalAs(UnmanagedType.Bool)] bool fRetainingt,
[MarshalAs(UnmanagedType.U4)] OletxXacttc grfTC,
uint grfRM);

void Abort(
IntPtr reason,
[MarshalAs(UnmanagedType.Bool)] bool retaining,
[MarshalAs(UnmanagedType.Bool)] bool async);

void GetTransactionInfo(out OletxXactTransInfo xactInfo);

void CloneWithCommitDisabled([MarshalAs(UnmanagedType.Interface)] out ITransaction ppITransaction);
}
4 changes: 2 additions & 2 deletions src/libraries/System.Transactions.Local/tests/OleTxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ public void GetExportCookie()
Assert.Equal(tx.TransactionInformation.DistributedIdentifier, tx2.TransactionInformation.DistributedIdentifier);
});

// Test currently skipped, #74745
private void GetDtcTransaction()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
public void GetDtcTransaction()
=> Test(() =>
{
using var tx = new CommittableTransaction();
Expand Down