Results 1 to 6 of 6

Thread: distributing and updating DLL's

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    82

    Exclamation

    Someone has told me that the best way to distribute and update applications is through DLL's, well I have been testing the updating of DLL's and have found these problems:

    when I save the changes and recompile the DLL, I get an error:

    'Run-Time Error 430

    Class does not support Automation or does not support epected interface'

    I would have to re-Reference the DLL in my EXE Project and recompile it for it to work properly.

    Of course I wouldn't want that if I would have updates on the system, nor would I want to have to ditribute the whole EXE.

    how do I distribute the new DLLs? What I understand is you can not have to DLLs having two different tasks right?

  2. #2
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Post Binary compatability

    You probably do not have 'Binary Compatability' set in your DLL project. (Project properties)

    If you maintain binary compatability with the previous version of the DLL, you won't need to re-compile the client project(s) when you re-compile your DLL.

    In order to maintain binary compatability between versions, you must not do any of the following:

    • Remove any of the public methods, properties or enumerators from a public class module
    • Remove any parameters from any public methods in public class modules
    • Change the data type of any parameters or return values in public methods (of public class modules)
    • Change the name of any individual enumerator constants


    You may always add methods, properties, paramters and enumerators.

  3. #3
    New Member
    Join Date
    Mar 2001
    Posts
    2

    distributing and updating DLL's

    I have Binary Compatibility set but I also want to change the datatype of some parameters in the public method and I want to add some parameters to the class module.

    This wont' be compatibile with the original declaration of the class module because I have changed and added some parameters. I get the message stating if I want to break compatibility and if I say yes I thought this meant that I no longer want to use the original declaration I want to use the new one that I have modified. But it still seem to reference the original class module definition.

    Do I have to clean out the registry in order for the new definitions to work when I re-compile???

  4. #4
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Smile Not quite...

    Firstly, you can add parameters, procedures, enumerators to a class without breaking compatability.

    If you do break compatability, you will assign a new GUID to the DLL (when it's re-compiled).

    Any client projects that were referencing your DLL will still be expecting the DLL to have the old GUID.

    Simply re-compile the client projects and all will be fine (they will be updated to expect the new GUID).
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    82

    Exclamation

    a question I have is this though, I've tried deploying just the DLL with Package and Deployment Wizard but when I tried to open the program that uses the DLL, it still accesses the old DLL. I know that DLL's are built to support the old versions that it has, so how do I create my 'patches' so that my program would access the new DLL without recompiling the program?

  6. #6
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Unhappy You can't

    If you break compatability with your DLL, a new GUID is assigned to it.

    Your client project identifies the version it wants by the GUID so you have to recompile your client project.

    I must admit though that I don't know much about the packaging and deployment wizard as I have never used it.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

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