ITransactionDispenser::BeginTransaction

This method initiates a new transaction and returns a new transaction object which represents the transaction.

HRESULT BeginTransaction (
IUnknown
punkOuter, 
ISOLEVEL
isoLevel, 
ULONG
isoFlags,
ITransactionOptions *
pOptions,
ITransaction **
ppTransaction)

Parameters

punkOuter [in]
Must be NULL.

isoLevel [in]
The isolation level to be used for this transaction. This value is ignored by MS DTC and passed on to the resource managers.

isoFlags [in]
Must be zero.

pOptions [in]
A pointer to a transaction options object. This value may be NULL. If pOptions is NULL the time-out value for the transaction is infinite and the transaction will not have a description.

ppTransaction [out]
Pointer to the pointer to the ITransaction interface on the new transaction object.

Return Values

S_OK
Success.

CLASS_E_NOAGGREGATION
punkOuter was not NULL.

XACTTC_E_LOGFULL
Unable to begin a new transaction because the log file is full.

XACT_E_NOTIMEOUT
A time-out was specified, but time-outs are not supported.

E_OUTOFMEMORY
Unable to allocate memory.

E_FAIL
An unknown error occurred.

E_UNEXPECTED
An unknown error occurred.

E_INVALIDARG
ppTransaction was NULL.

XACT_E_CONNECTION_DOWN
No longer able to communicate with the transaction manager because the connection to the transaction manager failed.

XACT_E_TMNOTAVAILABLE
Unable to connect to the transaction manager or the transaction manager is unavailable.

XACT_E_CONNECTION_REQUEST_DENIED
The transaction manager did not accept a connection request.

Comments

A transaction options object which is passed as a parameter to BeginTransaction must not be altered while the BeginTransaction method invocation is outstanding.