Condividi tramite


ITransactionVoterBallotAsync2::VoteRequestDone

 

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

An application server invokes the VoteRequestDone method to submit a vote during the prepare phase of a transaction.

Syntax

  
HRESULT VoteRequestDone(   HRESULT hr,  BOID * pboidReason);  

Parameters

hr
[in] HRESULT returning a transaction voter's vote. An application sets this value to S_OK or XACT_S_NONOTIFY to approve the transaction. XACT_S_NONOTIFY specifies that the voter does not want the transaction manager to return with an outcome notification. E_FAIL specifies that the DTC should abort the transaction.

pboidReason
[in] Pointer to a BOID returning a transaction abort reason code. This value should be NULL if the voter approved the transaction. Otherwise, the voter can optionally set this value with an abort reason.

Return Values

S_OK
Success.

E_INVALIDARG
One or more parameters were invalid. For example, pboidReason must be NULL if hr == S_OK.

E_UNEXPECTED
An unexpected error occurred.

E_FAIL
VoteRequestDone was called illegally.

XACT_E_CONNECTION_DOWN
Lost connection with the transaction manager.

Remarks

The vote is submitted when the DTC sends it a vote request through the ITransactionVoterNotifyAsync2 interface. The voter can either approve the transaction or vote against it. When a voter successfully votes to abort a transaction, it is not notified of the transaction outcome.

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 txdtc.h