ObjectContext 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.

ObjectContext and IObjectContext provide the same functionality, but unlike IObjectContext, ObjectContext is compatible with Automation.

Inheritance

The ObjectContext interface inherits from the IDispatch interface. ObjectContext also has these types of members:

Methods

The ObjectContext interface has these methods.

 
ObjectContext::CreateInstance

Creates an object using current object's context.
ObjectContext::DisableCommit

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

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

Retrieves an enumerator for the named context object properties.
ObjectContext::get_ContextInfo

Retrieves the context information object of the current object's context.
ObjectContext::get_Count

Retrieves the number of named context object properties.
ObjectContext::get_Item

Retrieves a named property.
ObjectContext::get_Security

Retrieves the security object of the current object's context.
ObjectContext::IsCallerInRole

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

Indicates whether the current object is executing in a transaction.
ObjectContext::IsSecurityEnabled

Indicates whether security is enabled for the current object.
ObjectContext::SetAbort

Declares that the transaction in which the object is executing must be aborted and that the object should be deactivated on return.
ObjectContext::SetComplete

Declares that the transaction in which the object is executing can be committed and that the object should be deactivated on return.

Requirements

   
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

IObjectContext