ITransactionDispenser::GetOptionsObject

This method creates a transaction options object.

HRESULT GetOptionsObject (
ITransactionOptions **
ppOptions);

Parameters

ppOptions [out]
Pointer to the pointer to the ITransactionOptions interface on the transaction options object. Must not be NULL.

Return Values

S_OK
Success.

E_OUTOFMEMORY
Unable to allocate memory.

E_INVALIDARG
The value of ppOptions is NULL.

Comments

The transaction options object obtained from the GetOptionsObject call can be assigned transaction attributes by calling the ITransactionOptions::SetOptions method. The transaction options object can then be passed to ITransactionDispenser::BeginTransaction. The transaction attributes from the transaction options object will be inherited by the newly created transaction object.

A process may create as many transaction options objects as it wishes.

Two or more threads may simultaneously invoke the BeginTransaction method using the same transaction options object. However, the attributes of the transaction options object must not be changed while the object is in use by the BeginTransaction method.