CommitTransaction function (ktmw32.h)

Requests that the specified transaction be committed.

Syntax

BOOL CommitTransaction(
  [in] HANDLE TransactionHandle
);

Parameters

[in] TransactionHandle

A handle to the transaction to be committed.

This handle must have been opened with the TRANSACTION_COMMIT access right. For more information, see KTM Security and Access Rights.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is 0 (zero). To get extended error information, call the GetLastError function.

The following list identifies the possible error codes:

Remarks

You can commit any transaction handle that has been opened or created using the TRANSACTION_COMMIT permission; any application can commit a transaction, not just the creator.

This function can only be called if the transaction is still active, not prepared, pre-prepared, or rolled back.

Requirements

Requirement Value
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

CreateTransaction

Kernel Transaction Manager Functions

OpenTransaction

RollbackTransaction