Platform SDK: Transaction Server |
IDtcToXaMapper::RequestNewResourceManager
Used to obtain a RM cookie which is stored in the connection object.
HRESULT RequestNewResourceManager ( char pszDSN, char pszClientDllName, DWORD * pdwRMCookie);
Parameters
pszDSN [in]
A string containing the Data Source Name (DSN).
pszClientDllName [in]
A string containing the name of the client DLL.
pdwRMCookie [in/out]
A cookie representing the RM corresponding to the DSN is returned via this parameter.
Return Values
S_OK
Success.
E_FAIL
The attempt to create the resource manager failed due to a bad installation of the XA TM or the DTC TM.
E_INVALIDARG
One or more of the parameters are not valid.
E_OUTOFMEMORY
Unable to allocate resources for a new resource manager.
E_UNEXPECTED
An unexpected error occurred.
XACT_E_CONNECTIONDOWN
Lost connection with DTC TM.
XACT_E_TMNOTAVAILABLE
Unable to establish a connection with DTC service.
Comments
The RequestNewResourceManager method is typically 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.