O'Reilly logo

COM+ Programming with Visual Basic by Jose Mojica

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Versioning

If you know the phrase binary compatibility, you and I share the same pain. If you have never heard these words, then this chapter will spare you from the pain. This chapter is about versioning your COM components. Whenever I teach a course at a company, there is always a student who wants to know COM’s versioning scheme. People often have the idea that COM has a great versioning story. The truth is that COM’s versioning mechanism is very simple—once you have published an interface, you are not allowed to change it ever again. That’s it! If you never change interfaces that you have published, then you do not have a problem with versioning.

The reality, however, is that often we cannot live with an interface after it has been released without modifications. At the very least, we would like to extend the interface to add new functions. The truth is that COM interfaces cannot be changed, period, not even to add functionality. To understand why, let’s first discuss the goal of COM’s rigid versioning rule. Then we’ll discuss the different kinds of client programs and what each of them requires in terms of versioning. After that, we’ll talk about why it is difficult to version things in Visual Basic. Once we have discussed the problems, I will show you the mechanism that Visual Basic offers for versioning. Although I am a big fan of Visual Basic in general, I am not fond of VB’s versioning scheme. Therefore, at the end of the chapter, I will show you a better way ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required