Skip to content

Latest commit

 

History

History
98 lines (82 loc) · 3.68 KB

nf-comsvcs-iobjectcontext-enablecommit.md

File metadata and controls

98 lines (82 loc) · 3.68 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:comsvcs.IObjectContext.EnableCommit
IObjectContext::EnableCommit (comsvcs.h)
Declares that the object's work is not necessarily finished but that its transactional updates are in a consistent state and could be committed in their present form.
EnableCommit
EnableCommit method [COM+]
EnableCommit method [COM+]
IObjectContext interface
IObjectContext interface [COM+]
EnableCommit method
IObjectContext.EnableCommit
IObjectContext::EnableCommit
_cos_IObjectContext_EnableCommit
comsvcs/IObjectContext::EnableCommit
cos.iobjectcontext_enablecommit
cos\iobjectcontext_enablecommit.htm
cos
6571aadc-bf5a-48c3-817a-66ce444ef96a
12/05/2018
EnableCommit, EnableCommit method [COM+], EnableCommit method [COM+],IObjectContext interface, IObjectContext interface [COM+],EnableCommit method, IObjectContext.EnableCommit, IObjectContext::EnableCommit, _cos_IObjectContext_EnableCommit, comsvcs/IObjectContext::EnableCommit, cos.iobjectcontext_enablecommit
comsvcs.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Windows
19H1
IObjectContext::EnableCommit
comsvcs/IObjectContext::EnableCommit
c++
APIRef
kbSyntax
COM
ComSvcs.h
IObjectContext.EnableCommit

IObjectContext::EnableCommit

-description

Declares that the object's work is not necessarily finished but that its transactional updates are in a consistent state and could be committed in their present form.

-returns

This method can return the following values.

Return code Description
S_OK
The method completed successfully and the object's transactional updates can now be committed.
E_UNEXPECTED
An unexpected error occurred. This can happen if one object passes its IObjectContext pointer to another object and the other object calls EnableCommit using this pointer. An IObjectContext pointer is not valid outside the context of the object that originally obtained it.

-remarks

When an object calls EnableCommit, it allows the transaction in which it's participating to be committed but it maintains its internal state across calls from its clients until it calls SetComplete or SetAbort or until the transaction completes.

EnableCommit is the default state when an object is activated. Therefore, an object should always call SetComplete or SetAbort before returning from a method, unless you want the object to maintain its internal state for the next call from a client.

-see-also

IObjectContext