SUMMARY
Every Microsoft Transaction Server (MTS) object in Microsoft Windows NT 4.0, or COM+ object in Microsoft Windows 2000, has an associated context object. The context object provides context for the execution of an instance, including transaction, activity, and security properties. When an MTS or COM+ object is created, MTS or COM+ automatically creates a context object for it. When the MTS object is released, MTS automatically releases the context object.
You can access an MTS or COM+ object's context by calling the
GetObjectContext function. The
GetObjectContext function returns a reference to the IObjectContext interface. The context object is not available during calls to the component's Class_Initialize and Class_Terminate event. If you call one of its methods, the following error message appears in Windows NT 4.0:
Run-time error '91':
Object variable or With block variable not set
Under Windows 2000, the following error message appears:
Run-time error '438':
Object variable or With block variable not set
NOTE: This problem has been corrected in Windows 2000 Service Pack 1.