ITransactionEnlistmentAsync::PrepareRequestDone
Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista
The resource manager invokes this method to inform the transaction manager that it has completed the prepare phase of the two-phase commit protocol.
Syntax
HRESULT PrepareRequestDone( HRESULT hr, IMoniker * pmk, BOID * pboidReason);
Parameters
hr
[in] The resource manager uses the hr parameter to inform the transaction manager of the outcome of the prepare phase.
Value of hr parameter | Meaning |
---|---|
S_OK | Success. The transaction is prepared. |
XACT_S_READONLY | Success. The resource manager votes yes because the transaction was read-only. The resource manager will not be notified of the commit. |
E_FAIL | Failure. The resource manager has aborted the transaction. |
E_UNEXPECTED | Failure. An unknown error occurred. The resource is in an indeterminate state. The transaction will abort. |
XACT_S_SINGLEPHASE | Success: The resource manager has committed the transaction and does not want commit notification. This HRESULT should be specified only if the fSinglePhase flag was TRUE in the call to ITransactionResourceAsync::PrepareRequest. |
pmk
[in] Must be NULL.
pboidReason
[in] Pointer to a BOID explaining why the transaction could not be prepared. This parameter must be NULL if hr is S_OK, XACT_S_READONLY, or XACT_S_SINGLEPHASE.
Return Values
S_OK
Success.
E_UNEXPECTED
An unexpected error occurred.
E_INVALIDARG
The value of pboidReason must be NULL for the specified hr, or an invalid hr was specified.
E_FAIL
PrepareRequestDone was called illegally.
XACT_E_NOTSINGLEPHASE
Indicates that the fSinglePhase flag to the ITransactionResourceAsync call was FALSE, but the RM is trying to do the single-phase optimization.
Requirements
For an explanation of the requirement values, see Requirements (Component Services).
Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista
Header: Declared in txcoord.h