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:

  1. If the workstation making the call has a locally installed MS DTC, the local MS DTC is used.
  2. If the workstation making the call is a Windows 95 computer or a Windows NT computer which does not have a local MS DTC installed, the default MS DTC is used. The default MS DTC is defined using the DTCCFG control panel application. See the Guide to Microsoft Distributed Transaction Coordinator for more information on DTCCFG.

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.