IObjectContext interface (comsvcs.h)

Provides access to the current object's context. An object's context is primarily used when working with transactions or dealing with the security of an object.

Inheritance

The IObjectContext interface inherits from the IUnknown interface. IObjectContext also has these types of members:

Methods

The IObjectContext interface has these methods.

 
IObjectContext::CreateInstance

Creates an object using current object's context. (IObjectContext.CreateInstance)
IObjectContext::DisableCommit

Declares that the object's transactional updates are in an inconsistent state and cannot be committed in their present state.
IObjectContext::EnableCommit

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.
IObjectContext::IsCallerInRole

Indicates whether the object's direct caller is in a specified role (either directly or as part of a group). (IObjectContext.IsCallerInRole)
IObjectContext::IsInTransaction

Indicates whether the object is executing within a transaction.
IObjectContext::IsSecurityEnabled

Indicates whether security is enabled for the current object. COM+ security is enabled unless the object is running in the client's process.
IObjectContext::SetAbort

Declares that the transaction in which the object is executing must be aborted and that the object should be deactivated when it returns from the currently executing method call.
IObjectContext::SetComplete

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.

Remarks

As with any COM object, you must release an IObjectContext object when you are finished using it, unless it is a local variable.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

CoGetObjectContext

GetObjectContext