ITransactionDispenser::GetOptionsObject

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

This method creates a transaction options object.

Syntax

  
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.

Remarks

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.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in transact.h

See Also

ITransactionOptions