Platform SDK: Transaction Server |
DtcGetTransactionManager Function
This is typically the first MS DTC call that application programs and resource managers make when using MS DTC. This helper function establishes the initial connection to MS DTC. It returns an interface pointer to one of the interfaces on the MS DTC proxy core object.
Implemented by: | MS DTC proxy |
Object | This is a helper function, not a method on an object |
Interface Source | N/A |
Called by: | Application programs and resource managers |
HRESULT __cdecl DtcGetTransactionManager (
char * |
pszHost, |
char * |
pszTmName, |
REFIID |
riid, |
DWORD |
dwReserved1, |
WORD |
wcbVarLenReserved2, |
void * |
pvVarDataReserved2, |
void ** |
ppv); |
Parameters
pszHost [in]
Name of the host system which will serve as the transaction commit coordinator.
pszTmName [in]
String Name of the transaction manager which will serve as the transaction commit coordinator. Must be NULL.
riid [in]
IID of the requested interface.
dwReserved1 [in]
Reserved parameter. Must be zero.
wcbVarLenReserved2 [in]
Reserved parameter. Must be zero.
pvVarDataReserved2 [in]
Reserved parameter. Must be NULL.
ppv [out]
Pointer to the pointer to the requested interface.
Comments
Calls to DtcGetTransactionManager can specify a server host name in the pszHost parameter. This lets the transaction to be started and coordinated on a specific computer on the network. If a value of NULL is supplied, the following rules determine where the transaction is started and coordinated:
Return Values
S_OK
Success.
E_NOINTERFACE
Unable to provide the requested interface.
E_UNEXPECTED
Unexpected error encountered.
E_INVALIDARG
One or more arguments are invalid.
E_FAIL
Failed to carry out the operation.