CreateTransactionManager function (ktmw32.h)

Creates a new transaction manager (TM) object and returns a handle with the specified access.

Syntax

HANDLE CreateTransactionManager(
  [in, optional] LPSECURITY_ATTRIBUTES lpTransactionAttributes,
  [in, optional] LPWSTR                LogFileName,
  [in, optional] ULONG                 CreateOptions,
  [in, optional] ULONG                 CommitStrength
);

Parameters

[in, optional] lpTransactionAttributes

The transaction SECURITY_ATTRIBUTES (ACLs) for the TM object.

[in, optional] LogFileName

The log file stream name. If the stream does not exist in the log, it is created. To create a volatile TM, this parameter must be NULL and CreateOptions must specify TRANSACTION_MANAGER_VOLATILE, this transaction manager is considered volatile.

[in, optional] CreateOptions

Any optional attributes for the new TM.

Value Meaning
TRANSACTION_MANAGER_VOLATILE
Indicates that the TM is volatile, and does not perform recovery.

[in, optional] CommitStrength

Reserved; specify zero.

Return value

If the function succeeds, the return value is a handle to the transaction manager.

If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call the GetLastError function.

The following list identifies the possible error codes:

Remarks

Immediately after calling this function, you must call RecoverTransactionManager.

If your transaction manager is volatile, all your your resource managers must also be volatile.

You must call RecoverTransactionManager after creating a TM in order for the TM to function correctly.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header ktmw32.h
Library Ktmw32.lib
DLL Ktmw32.dll

See also

Kernel Transaction Manager Functions

OpenTransactionManager

RecoverTransactionManager

SECURITY_ATTRIBUTES