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
This method obtain a RM cookie which is stored in the connection object. The RequestNewResourceManager method is invoked only once per ODBC connection. It is not required after the connection transitions from the local transaction state to the distributed transaction state.
An ODBC connection can be in one of two states, distributed transaction state, or non-distributed transaction state as shown in the Transaction States topic.
HRESULT RequestNewResourceManager( CHAR * pszDSN, CHAR * pszClientDllName, DWORD * pdwRMCookie);
[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.
[in] A string containing the name of the resource manager's client DLL.
[in/out] A cookie representing the RM corresponding to the DSN is returned via this parameter.
The attempt to create the resource manager failed due to a bad installation of the XA TM or the DTC TM or the size of the string pointed to by the pszDSN parameter is too large.
One or more of the parameters are not valid.
Unable to allocate resources for a new resource manager.
An unexpected error occurred.
Lost connection with DTC TM.
Unable to establish a connection with DTC service.Failure—the TMs log is full.
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