CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Binary Compatible File set

    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

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Binary Compatible File set

    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
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Binary Compatible File set

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured