CreateTransactionManager function

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

Syntax


HANDLE WINAPI CreateTransactionManager(
  _In_opt_ LPSECURITY_ATTRIBUTES lpTransactionAttributes,
  _In_opt_ LPWSTR                LogFileName,
  _In_opt_ ULONG                 CreateOptions,
  _In_opt_ ULONG                 CommitStrength
);

Parameters

lpTransactionAttributes [in, optional]

The transaction SECURITY_ATTRIBUTES (ACLs) for the TM object.

LogFileName [in, optional]

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.

CreateOptions [in, optional]

Any optional attributes for the new TM.

ValueMeaning
TRANSACTION_MANAGER_VOLATILE

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

 

CommitStrength [in, optional]

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:

ERROR_INSUFFICIENT_RESOURCES
ERROR_INVALID_ACL
ERROR_INVALID_SID
ERROR_INVALID_PARAMETER
ERROR_OBJECT_NAME_COLLISION
ERROR_OBJECT_NAME_EXISTS
ERROR_OBJECT_NAME_INVALID
ERROR_OBJECT_TYPE_MISMATCH
ERROR_PRIVILEGE_NOT_HELD
ERROR_UNKNOWN_REVISION

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

Header

Ktmw32.h

Library

Ktmw32.lib

DLL

Ktmw32.dll

See also

Kernel Transaction Manager Functions
OpenTransactionManager
RecoverTransactionManager
SECURITY_ATTRIBUTES

 

 

Show: