Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 22,264 times

Contents

Related Categories

Keeping VB Components Compatible - Compatibility Defined

LACanadian

Compatibility Defined

Visual Basic provides three levels of compatibility for your choosing

No Compability Every time that you recompile your project, a new GUID is generated and assigned to each interface
Project Compatibility The type library, class ids and interface ids are kept the same whenever possible. If the compatibility rules (outline shortly) are violated, then the GUIDs are regenerated. However, no validation of compatibility is performed. In other words, with Project Compatibility turned on, you can compile and release components that have the same GUIDs, but which are not compatible with previously released components. I cannot stress with enough vigor how bad it can be to do this. Not the setting of Project Compability, but releasing components that are not backwards compatible but share the same GUID. This is the kind of behavior that developers have been cursing vendors for since Windows was released. I can almost guarantee that you will spend many hours trying to figure out why your previously working application is throwing errors in weird places. Trust me on this one. The voice of experience (and many wasted hours the one time I did this) speaks.
Binary Compatibility Assuming that the compatibility rules are followed, the various IDs will remain unchanged. If your project breaks compatibility while this option is set, you will receive a dialog box asking you to confirm that you want to break compatibility. The dialog box is a red flag that says you should look more closely at what you're doing. Rather than just agreeing to break compatibility, you should rethink your compatibility setting.

I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web site look good, our expertise is in making the site function. This includes infrastructure design, database design and administration, software development and deployment. For the most part, we utilize Microsoft-based languages and tools. And we are skilled enough to have generated two patent applications for our clients.

Comments

  • Removing old references

    Posted by LACanadian on 31 Jan 2003

    When I've had the same problem, I would follow these steps:

    1. Manually unregister the component with regsvr32 /u [i]path[/i].

    2. Edit the registry using your favorite tool

    3. Starting in ...

  • How to remove old references?

    Posted by dhnc on 21 Nov 2002

    Very interesting article on component compatibility. It gave me good insight in something I had trouble with during a long time already.
    I have the following question though:
    how can you remove the ...

  • Very Good

    Posted by pleitch on 10 Jul 2002

    Looks like it is straight out of a text book. I checked through it all and it is all correct. I had to by a series of advanced COM/COM++/VB and COM books to decypher - ah I mean learn - the same inf...