ITransactionOptions::SetOptions

Sets a suite of options associated with a transaction.

HRESULT SetOptions(
   XACTOPT *   pOptions);

Parameters

pOptions

[in]
A pointer to an XACTOPT structure containing the options to be set in this transaction. This cannot be a null pointer.

typedef struct XACTOPT {
 ULONG   ulTimeout;
 unsigned char szDescription[MAX_TRAN_DESC];
} XACTOPT

The elements of this structure are used as follows.

Element Description
ulTimeout The amount of real time in milliseconds before the transaction is to be aborted automatically. Zero indicates an infinite timeout. If no options have been previously set, ulTimeout is zero.
szDescription A pointer to a textual description associated with this transaction. This string is appropriate for display in various end-user administration tools that might monitor or log the transaction. If no options have been previously set, szDescription is an empty string.


Return Code

S_OK
The method succeeded.

E_FAIL
A provider-specific error occurred.

E_INVALIDARG
pOptions was a null pointer.

E_UNEXPECTED
An unknown error occurred; the method failed.

See Also

ITransactionOptions::GetOptions, ITransactionLocal::StartTransaction