Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Commits the transaction.
Syntax
HRESULT Commit(
[in] GUID guid
);
Parameters
[in] guid
A GUID that identifies the transaction to commit.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.
| Return code | Description |
|---|---|
|
The transaction was committed. |
|
The transaction was aborted. |
Remarks
Calling ITransactionProxy::Commit attempts to commit a transaction. However, the transaction aborts under the following conditions:
- If a participating object returns from a method after calling SetAbort.
- If an object calls DisableCommit and returns without calling EnableCommit or SetComplete.
- If an error causes the Microsoft Distributed Transaction Coordinator (DTC) to abort.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP with SP2 [desktop apps only] |
| Minimum supported server | Windows Server 2003 with SP1 [desktop apps only] |
| Target Platform | Windows |
| Header | comsvcs.h |