Sdílet prostřednictvím


IDtcToXaHelperSinglePipe::XARMCreate

 

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

ODBC drivers call the XARMCreate method each time they open a new ODBC connection to the database. The information the ODBC driver provides makes it possible for the DTC transaction manager to perform database recovery.

The transaction manager durably records this information in its log file. If recovery is necessary, the transaction manager reads the log file, reconnects to the database, and initiates XA recovery.

Syntax

  
HRESULT XARMCreate (   char * pszDSN,  char * pszClientDllName,  DWORD * pdwRMCookie);  

Parameters

pszDSN
[in] A string containing the Data Source Name (DSN).

The maximum size of this string is 3,072 characters. Prior to Windows Server 2016 and Windows 10 the maximum size is 256 characters; larger strings would cause the call to fail with E_FAIL.

pszClientDllName
[in] A string containing the name of the client DLL.

pdwRMCookie
[in,out] RMCookie representing the ODBC connection. The RMCookie is an input parameter in all later IDtcToXaHelperSinglePipe calls.

Return Values

S_OK
Success.

E_FAIL
The attempt to create the XA helper object failed due to a bad installation of the DTC or the size of the string pointed to by the pszDSN parameter is too large.

E_INVALIDARG
One or more of the parameters are NULL or not valid.

E_OUTOFMEMORY
Unable to allocate resources for a XA helper object.

E_UNEXPECTED
An unexpected error occurred.

XACT_E_CONNECTION_DOWN
Lost connection with DTC transaction manager.

XACT_E_TMNOTAVAILABLE
Unable to establish a connection with DTC service.

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

See Also

IDtcToXaHelper
IDtcToXaHelperFactory
IDtcToXaMapper