Obtains a reference to the IObjectContext interface on the ObjectContext that's associated with the current MTS object.
GetObjectContext is a static method of the MTx class, which is declared in the package com.ms.mtx.
Note The MTx class has only static methods and has no public constructor. You can't create an instance of this class.
IObjectContext GetObjectContext ( );
Return Value
A reference to the IObjectContext interface on the current object's context. GetObjectContext will return null if it is called from a constructor or finalizer, or if the object's component hasn't been imported into an MTS package.
Remarks
An object should never attempt to pass its ObjectContext reference to another object. If you pass an ObjectContext reference to another object, it will no longer be a valid reference.
See Also
Building Scalable Components, Context Objects, IObjectContext.CreateInstance Method