getObjectContext Method

Obtains a reference to the ObjectContext that's associated with the current MTS object.

getObjectContext is a static method of the Context class, which is declared in the package com.ms.mtx.

Note The class Context has only static methods and has no public constructor. You can't create an instance of this class.

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

© 1999 Microsoft Corporation. All rights reserved. Terms of use.