Results 1 to 3 of 3

Thread: Activex EXE compatibility help

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    14

    Activex EXE compatibility help

    Hi,
    I have an activex exe compiled with binary compatibility.

    I works perfect, when referenced in an another project.
    But when I compile it to it's original settings right from the
    begining as if I am compiling it for the first time
    (I also received a message about breaking of compatibility) then
    there is a problem in the referenced project.
    The error I get is 'Activex cannot be created'.

    What I want is to accomodate updated activex exe in the
    referenced project without disturbing the compatibility.

    I use VB 6.0 version

  2. #2
    Junior Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    23
    Try recompiling it in project compatibility mode instead.

    ActiveX components have various GUIDs associated with then under HKCR in the registry. I can't remember the proper names for these, but there is one generated for the project and one generated for each public class in your project.

    You can probably guess that the project GUID is the one to identify it for your "references".

    When a VB project is compiled as No Compatibility, all the GUIDs are regenerated (meaning the new component looks nothing like the old one). Any dependant component needs to have it's references updated and then recompiled.

    If it's compiled with Project Compatibility only the class's GUIDs are regenerated. This means that your references remain intact, but all dependant components need to be recompiled to accept the new changes.

    If Binary Compatibility is used then none of the GUIDs are regenerated. This means that existing components can quite happily use the changed component without recompilation.

    Hope this helps.
    Dave

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    23
    One other thing.

    VB isn't very good at cleaning up components. When you break compatibility all the GUIDs are regenerated and the old GUID values remain in the registry.

    This means that ghost images of your old components remain and can confuse references in dependant projects.

    I recommend that before you break compatibility on a project, that you unregister the component first.

    Also, never delete an activeX component using the delete key. Always always use Shift+Delete. Windows tries to be smart when you use delete and can update the registry to point to your component in the recycler ... this can give misleading success conditions which suddenly stop working when the recycler finaly deletes it.

    Enjoy
    Dave
    Last edited by daughey; Mar 20th, 2003 at 04:31 AM.

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