Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB6,MTS,COM+
Expertise: Intermediate
Dec 8, 2001

Don't store object variables in the SPM

Some MTS/COM+ newbies wonder whether it is legal to store object variables in the SPM.

No, you can't!! the SPM is unaware of Apartment marshaling issues. If you ask the SPM for an interface pointer while running in an apartment that is different from the one where the interface pointer resides the SPM will blindly pass you the rough interface pointer without marshaling it, thus violating COM rules (and your app will randomly fail). Park the interface pointer in the GIT and park the GIT cookie in the SPM.

This tip is taken from the FAQ list that Enrico mantains at his own home page (www.sabbasoft.com/mts_faq.htm).

Enrico Sabbadin
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap