Skip to content

Commit 1181506

Browse files
AaronRobinsonMSFTroji
authored andcommitted
Update COM interface definitions
1 parent 61e4a51 commit 1181506

11 files changed

+20
-20
lines changed

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/IResourceManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal void Enlist(
5151
internal void Reenlist(
5252
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pPrepInfo,
5353
uint cbPrepInfom,
54-
int lTimeout,
54+
uint lTimeout,
5555
[MarshalAs(UnmanagedType.I4)] out OletxXactStat pXactStat);
5656

5757
/// <summary>

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransaction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal interface ITransaction
2222
/// <param name="fRetainingt">Must be FALSE.</param>
2323
/// <param name="grfTC">Values taken from the <see cref="OletxXacttc" /> enumeration</param>
2424
/// <param name="grfRM">Must be zero.</param>
25-
void Commit(bool fRetainingt, [MarshalAs(UnmanagedType.U4)] OletxXacttc grfTC, uint grfRM);
25+
void Commit([MarshalAs(UnmanagedType.Bool)] bool fRetainingt, [MarshalAs(UnmanagedType.U4)] OletxXacttc grfTC, uint grfRM);
2626

2727
/// <summary>
2828
/// This method aborts the transaction.
@@ -34,7 +34,7 @@ internal interface ITransaction
3434
/// <param name="async">
3535
/// When fAsync is true, an asynchronous abort is performed and the caller must use ITransactionOutcomeEvents to learn the outcome of the transaction.
3636
/// </param>
37-
void Abort(IntPtr reason, int retaining, int async);
37+
void Abort(IntPtr reason, [MarshalAs(UnmanagedType.Bool)] bool retaining, [MarshalAs(UnmanagedType.Bool)] bool async);
3838

3939
/// <summary>
4040
/// This method returns information regarding a transaction object.

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransactionExportFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal interface ITransactionExportFactory
3636
/// The caller uses the export object returned by this method to marshal a transaction object for export to the destination process.
3737
/// </param>
3838
void Create(
39-
ulong cbWhereabouts,
39+
uint cbWhereabouts,
4040
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] rgbWhereabouts,
4141
[MarshalAs(UnmanagedType.Interface)] out ITransactionExport ppExport);
4242
}

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransactionImport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal interface ITransactionImport
2626
/// <param name="piid">The interface ID desired on the resulting transaction object.</param>
2727
/// <param name="ppvTransaction">Reference to the interface on the imported transaction object, requested by the <paramref name="piid" /> parameter.</param>
2828
void Import(
29-
ulong cbTransactionCookie,
29+
uint cbTransactionCookie,
3030
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] rgbTransactionCookie,
3131
Guid piid,
3232
[MarshalAs(UnmanagedType.Interface)] out object ppvTransaction);

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransactionOutcomeEvents.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal interface ITransactionOutcomeEvents
2323
/// <param name="fRetaining">Indicates whether retaining Commit was specified. Will be false.</param>
2424
/// <param name="pNewUOW">Always null.</param>
2525
/// <param name="hresult">Always S_OK.</param>
26-
void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW /* always null? */, uint hresult);
26+
void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW /* always null? */, int hresult);
2727

2828
/// <summary>
2929
/// This event is raised when the transaction aborted, either as a result of a call to Abort or an unsuccessful call to Commit*.*.
@@ -32,15 +32,15 @@ internal interface ITransactionOutcomeEvents
3232
/// <param name="fRetaining">Indicates whether retaining Commit was specified. Will be false.</param>
3333
/// <param name="pNewUOW">Always null.</param>
3434
/// <param name="hresult">Alawys S_OK.</param>
35-
void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW, uint hresult);
35+
void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, int hresult);
3636

3737
/// <summary>
3838
/// This event is raised when one of the participants in the transaction chooses to heuristically decide the outcome of the transaction.
3939
/// </summary>
4040
/// <param name="dwDecision">Values from the enumeration <see cref="OletxTransactionHeuristic" />.</param>
4141
/// <param name="pboidReason">A BOID indicating why the transaction was heuristically decided. This value is provided by the party making the heuristic decision.</param>
4242
/// <param name="hresult">Always S_OK.</param>
43-
void HeuristicDecision([MarshalAs(UnmanagedType.U4)] OletxTransactionHeuristic dwDecision, IntPtr pboidReason, uint hresult);
43+
void HeuristicDecision([MarshalAs(UnmanagedType.U4)] OletxTransactionHeuristic dwDecision, IntPtr pboidReason, int hresult);
4444

4545
/// <summary>
4646
/// This event is raised when the outcome of the transaction is in-doubt.

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransactionResourceAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ void PrepareRequest(
3737
/// </summary>
3838
/// <param name="grfRM">Values from <see cref="OletxXactRm" />.</param>
3939
/// <param name="pNewUOW">Always null.</param>
40-
void CommitRequest(OletxXactRm grfRM, Guid pNewUOW);
40+
void CommitRequest(OletxXactRm grfRM, IntPtr pNewUOW);
4141

4242
/// <summary>
4343
/// The DTC proxy calls this method to abort a transaction.
4444
/// </summary>
4545
/// <param name="pboidReason">Unspecified and should be ignored.</param>
4646
/// <param name="fRetaining">Always will be false.</param>
4747
/// <param name="pNewUOW">Always will be null.</param>
48-
void AbortRequest(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW);
48+
void AbortRequest(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW);
4949

5050
/// <summary>
5151
/// The DTC Proxy calls on this method if the connection to the transaction manager goes down and the resource manager's transaction object is prepared

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DTCInterfaces/ITransactionVoterNotifyAsync2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal interface ITransactionVoterNotifyAsync2
2424
/// <param name="fRetaining">Indicates whether retaining Commit was specified. Will be false.</param>
2525
/// <param name="pNewUOW">Always null.</param>
2626
/// <param name="hresult">Always S_OK.</param>
27-
void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW /* always null? */, uint hresult);
27+
void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW /* always null? */, uint hresult);
2828

2929
/// <summary>
3030
/// This event is raised when the transaction aborted, either as a result of a call to Abort or an unsuccessful call to Commit*.*.
@@ -33,7 +33,7 @@ internal interface ITransactionVoterNotifyAsync2
3333
/// <param name="fRetaining">Indicates whether retaining Commit was specified. Will be false.</param>
3434
/// <param name="pNewUOW">Always null.</param>
3535
/// <param name="hresult">Alawys S_OK.</param>
36-
void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW, uint hresult);
36+
void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult);
3737

3838
/// <summary>
3939
/// This event is raised when one of the participants in the transaction chooses to heuristically decide the outcome of the transaction.

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/EnlistmentNotifyShim.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ public void PrepareRequest(bool fRetaining, OletxXactRm grfRM, bool fWantMoniker
5151
ShimFactory.NewNotification(this);
5252
}
5353

54-
public void CommitRequest(OletxXactRm grfRM, Guid pNewUOW)
54+
public void CommitRequest(OletxXactRm grfRM, IntPtr pNewUOW)
5555
{
5656
NotificationType = ShimNotificationType.CommitRequestNotify;
5757
ShimFactory.NewNotification(this);
5858
}
5959

60-
public void AbortRequest(IntPtr pboidReason, bool fRetaining, Guid pNewUOW)
60+
public void AbortRequest(IntPtr pboidReason, bool fRetaining, IntPtr pNewUOW)
6161
{
6262
if (!_ignoreSpuriousProxyNotifications)
6363
{

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/TransactionNotifyShim.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ internal TransactionNotifyShim(NotificationShimFactory shimFactory, object? enli
1414
{
1515
}
1616

17-
public void Committed(bool fRetaining, Guid pNewUOW /* always null? */, uint hresult)
17+
public void Committed(bool fRetaining, IntPtr pNewUOW /* always null? */, int hresult)
1818
{
1919
NotificationType = ShimNotificationType.CommittedNotify;
2020
ShimFactory.NewNotification(this);
2121
}
2222

23-
public void Aborted(IntPtr pboidReason, bool fRetaining, Guid pNewUOW, uint hresult)
23+
public void Aborted(IntPtr pboidReason, bool fRetaining, IntPtr pNewUOW, int hresult)
2424
{
2525
NotificationType = ShimNotificationType.AbortedNotify;
2626
ShimFactory.NewNotification(this);
2727
}
2828

29-
public void HeuristicDecision(OletxTransactionHeuristic dwDecision, IntPtr pboidReason, uint hresult)
29+
public void HeuristicDecision(OletxTransactionHeuristic dwDecision, IntPtr pboidReason, int hresult)
3030
{
3131
NotificationType = dwDecision switch
3232
{

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/TransactionShim.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void CreateVoter(OletxPhase1VolatileEnlistmentContainer managedIdentifier
3838

3939
public void Export(byte[] whereabouts, out byte[] cookieBuffer)
4040
{
41-
_shimFactory.ExportFactory.Create((ulong)whereabouts.Length, whereabouts, out ITransactionExport export);
41+
_shimFactory.ExportFactory.Create((uint)whereabouts.Length, whereabouts, out ITransactionExport export);
4242

4343
uint cookieSizeULong = 0;
4444

src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/VoterNotifyShim.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public void VoteRequest()
2121
}
2222

2323
// TODO
24-
public void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW, uint hresult)
24+
public void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
2525
=> throw new NotImplementedException();
26-
public void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, Guid pNewUOW, uint hresult)
26+
public void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
2727
=> throw new NotImplementedException();
2828
public void HeuristicDecision([MarshalAs(UnmanagedType.U4)] OletxTransactionHeuristic dwDecision, IntPtr pboidReason, uint hresult)
2929
=> throw new NotImplementedException();

0 commit comments

Comments
 (0)