ITransactionOptions::SetOptions

Sets a suite of options associated with a transaction.


HRESULT SetOptions(
   XACTOPT *pOptions);

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 described in the following table.

Element

Description

ulTimeout

The amount of real time in milliseconds before the transaction is to be aborted automatically. Zero indicates an infinite time-out. 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.

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.

Show: