Click to See Complete Forum and Search --> : distributing and updating DLL's
manofprayer
Mar 14th, 2001, 02:26 AM
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?
simonm
Mar 14th, 2001, 07:53 AM
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.
mike34
Mar 21st, 2001, 10:43 AM
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???
simonm
Mar 21st, 2001, 10:55 AM
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).
manofprayer
Mar 21st, 2001, 07:36 PM
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?
simonm
Mar 22nd, 2001, 03:00 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.