IObjectContext::SetComplete method (comsvcs.h)
Declares that the transaction in which the object is executing can be committed and that the object should be deactivated when it returns from the currently executing method call.
This method can return the following values.
||The method completed successfully.|
||An unexpected error occurred. This can happen if one object passes its IObjectContext pointer to another object and the other object calls SetComplete using this pointer. An IObjectContext pointer is not valid outside the context of the object that originally obtained it.|
The object is deactivated automatically on return from the method in which it called SetComplete. If the object is the root of an automatic transaction, COM+ attempts to commit the transaction. However, if any object that was participating in the transaction has called SetAbort, or has called DisableCommit and has not subsequently called EnableCommit or SetComplete, the transaction is aborted.
If an object does not need to maintain its state after it returns from a method call, it should call SetComplete so that it can be automatically deactivated as soon as it returns and its resources can be reclaimed.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|