You are currently offline, waiting for your internet to reconnect

How To Use Project and Binary Compatibility

This article was previously published under Q161137
The Compatibility setting allows you to determine the Visual Basicproject's compatibility to older versions of the ActiveX Componentsgenerated from the project.

The ActiveX Components you create contain a default interface (for example,CName_D where CName is the ClassName for the ActiveX Component) thatcontains all of the methods and properties you have created. If your Classraises events, you also have an additional interface calledIConnectionPointContainer. When you build an ActiveX Control or Server,these Interfaces are given a unique identifier. If you modify your controlor server, these interfaces may change. Any applications using an olderversion of your component may fail at this point. To ensure that your newand old interfaces will work with all applications, you need to set theappropriate Compatibility setting.
You can set the Project's Compatibility in the Project\Properties dialogbox, under the Component tab.

Visual Basic has three different compatibility settings for Projects:
  • No compatibility.
  • Project compatibility.
  • Binary compatibility.

No Compatibility

With this setting, no compatibility is enforced. Visual Basic creates newInterface IDs and Class IDs every time you build or compile your project.Each version built can only be used with applications created to work withthat specific build of the component.

Project Compatibility

With this setting, you can make your project compatible to a specificcomponent project. While new type library information is generated, thetype library identifier is maintained so that test projects can still referto the component project. This setting is for maintaining compatibilityduring testing. Therefore, once the component is released, it behaves thesame as the No Compatibility setting.

Binary Compatibility

When you compile your project, Visual Basic only creates new Class andInterface IDs when necessary. It preserves the class and interface IDsfrom the previous version(s) so that programs compiled using an earlierversion will continue to work. If you are making a change that will resultin an incompatible version, Visual Basic will warn you. If you want tomaintain compatibility with older, released versions of an ActiveXcomponent, this is the setting you need to use.
Visual Basic 5.0 Components Guide, Chapter 7, "Debugging, Testing, andDeploying Components"

Article ID: 161137 - Last Review: 07/15/2004 20:06:00 - Revision: 1.3

  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • kbhowto kbusage KB161137