Browse DevX
Sign up for e-mail newsletters from DevX

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



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Don't let binary compatibility beat you

When you decide to release a new version of an MTS/COM+ component you should take care of its compatibility with the previous version. There are three types of changes you could make:

(1) You change only internal code of a component, keeping the interface that the component provides untouched.
(2) You only add a member(s) (method, property, enum etc.) to the interface, but leave declaration of previously declared members quite the same.
(3) You decided to revise the interface members and some of them are changed or even removed.

Thus, if you're building a component in VB it's strongly recommended to set Version Compatibility of the project to Binary Compatibility mode. In this case VB will track the changes of the interface(s) and will notify you if you make changes of type (3), but not (2).

To install a new version into MTS you should do the following: For changes of type (1) you can simply overwrite the older DLL with the newer one. The remote clients that had the client export registered need no intervention, but with both (2) and (3) types of changes you should completely reinstall the component (i.e. remove it from MTS and then install it back), you then need to re-export the package and have the remote clients run the client installation again (remove the old one before from Control Panel/Install remove applications). Don't forget to shut the component's package down to unlock components' DLLs. It's possible to shut a package down remotely and perform other administration operations "programmatically" (see MTS2.0 Admin Type Library).

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.



Thanks for your registration, follow us on our social networks to keep up-to-date