IObjectContextActivity Interface

The IObjectContextActivity interface is used to retrieve a unique identifier associated with the current activity. This activity identifier is a GUID, and is only valid for the lifetime of the current activity.

Remarks

The header file for the IObjectContextActivity is mtx.h. You must also link mtxguid.lib to your project to use this interface.

You obtain a reference to an object's IObjectContextActivity interface by calling QueryInterface on the object's ObjectContext. For example:

m_pIObjectContext->QueryInterface
    (IID_IObjectContextActivity, 
    (void**)&m_pIObjectContextActivity));

The IObjectContextActivity interface provides the following methods.

Method Description
GetActivityId Retrieves the GUID associated with the current activity.