Platform SDK: Transaction Server

IObjectContextActivity Interface

[This product will work only on Windows NT 4.0 versions and earlier. For Windows 2000 and later, see COM+ (Component Services).]

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.