John G Duffy
September 19th, 2001, 12:03 PM
I have this APP that contains two ActiveX Controls and a Client Form
DBManager has a Class module
PostIts has a class module which references DBManager
The Client form references both.
This APP runs just fine from the IDE, but when I try to compile I run into problems.
The DBManager Compiles just fine to an OCX.
When I try to Compile Postits to an ocx, I get a message
"The Project "'Postits can not be built because it references 'Project 'C:..\..DBManager.vbp ' which does not have a binary compatibility file set".
Question is What does this mean and how to overcome the problem? I have tried playing with the Project properties compatibilities but to no avail.
Thanks.
John G
Iouri
September 19th, 2001, 12:29 PM
Visual Basic?s Version Compatibility feature is a way of enhancing your components while maintaining
backward compatibility with programs that were compiled using earlier versions. The Version Compatibility
box, located on the Component tab of the Project Properties dialog box, contains three options:
No Compatibility:
============
Each time you compile the component, new type library information is generated, including
new class IDs and new interface IDs. There is no relation between versions of a component, and programs
compiled to use one version cannot use subsequent versions.
Project Compatibility:
===============
Each time you compile the component the type library identifier is kept, so that
your test projects can maintain their references to the component project. All class IDs from the previous
version are maintained; interface IDs are changed only for classes that are no longer binary-compatible
with their earlier counterparts.
Note This is a change in Project Compatibility from Visual Basic 5.0, where all class IDs and interface
IDs in the project changed if any one class was no longer binary-compatible.
Important For the purpose of releasing compatible versions of a component, Project Compatibility is
the same as No Compatibility.
Binary Compatibility:
==============
When you compile the project, if any binary-incompatible changes are detected
you will be presented with a warning dialog. If you choose to accept the warning, the component will
retain the type library identifier and the class IDs. Interface IDs are changed only for classes that
are no longer binary-compatible. This is the same behavior as Project Compatibility.
If, however, you choose to ignore the warning, the component will also maintain the interface IDs. This
option is only available when the compiler determines that the change was in the procedure ID or signature
of a method.
Caution You should only choose the Ignore button if you are absolutely sure that the changes you have
made won't break compatibility. If you aren't absolutely sure, take the safe alternative and choose
the Accept button to allow the interface ID's to be changed.
Important The option to override the compiler's warning represents a change in behavior from Visual
Basic 5.0. It is important that you fully understand the implications of incompatible changes before
proceeding with this option.
Note When people talk about Version Compatibility, they?re usually referring to Binary Compatibility.
Iouri Boutchkine
iouri@hotsheet.com
John G Duffy
September 20th, 2001, 06:15 AM
Iouri,
Thanks for the very informative info.
Being a self-taught VBer, I often overlook or "horrors" don't know how to do things.
I have managed to solve the problem by editing the individual components and creating the OCXes individually. I had to change the DBManager to Apartment Threaded from Single Threaded and that made the difference. Don't know why but it works.
Thanks.
John G