xa_prepare

 

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

Called by the XA-based transaction manager or any XA application that performs operations on a SQL Server database by using the XA interfaces, to prepare to commit work done on behalf of a transaction branch.

Implemented by: MSDTC
Object This is a helper function, not a method on an object.
Interface Source N/A
Called by: XA-based transaction manager.

Syntax

  
int __cdecl xa_prepare  (  __in XID *xid,  int  rmid,  long flags);  

Parameters

xid
[in] Specifies the XA Transaction Branch Identifier.

rmid
[in] Resource Manager ID.

flags
[in] Flags defined in [XAOpen – DTP] Chapter 4.4.

Return Values

Return code defined in Chapter 4.5 of [XAOpen – DTP].

Remarks

When a transaction manager or XA application calls xa_prepare for the transaction branch identified by the xid parameter, the resource manager identified by rmid must place all resources modified in the transaction branch in a state that can be made permanent if it receives a commit request.

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