ITransactionDispenser::GetOptionsObject

Creates a transaction options object. The transaction options object is obtained from the GetOptionsObject call and 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.

A process can create many transaction options objects.

Two or more threads can simultaneously call the BeginTransaction method and pass the same transaction options object as a parameter. However, the attributes of the transaction options object must not be changed while the object is being used by the BeginTransaction method.

Syntax

HRESULT GetOptionsObject (
ITransactionOptions** ppOptions )

where

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

Returns

S_OK
Indicates succeeded.
E_OUTOFMEMORY
Indicates unable to allocate memory.
E_INVALIDARG
Indicates the value of ppOptions is NULL.