Article ID: 250309 - Last Review: August 28, 2002 - Revision: 1.1 INFO: Do Not Use ObjectContext in Class_Initialize and Class_Terminate Events
This article was previously published under Q250309 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
Run-time error '438': Object variable or With block variable not set MORE INFORMATIONSimple Server
REFERENCES
For additional information, see the following article or articles in the
Microsoft Knowledge Base: 170156
(http://support.microsoft.com/kb/170156/EN-US/
)
INFO: VB 6.0 Readme Part 12: Transaction Server (MTS) Issues
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top