Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can changes to a dll be made, while keeping compatibility with pre-compiled executables?

We have a lot of executables that reference one of our dlls. We found a bug in one of our dlls and don't want to have to re-compile and redistribute all of our executables to fix it. My understanding is that dlls will keep their compatibility with their executables so long as you don't change anything in the header file. So no new class members, no new functions, etc... but a change to the logic within a function should be fine. Is this correct? If it is compiler specific, please let me know, as this may be an issue.

like image 777
Steve Goykovich Avatar asked Dec 28 '22 13:12

Steve Goykovich


1 Answers

Your understanding is correct. So long as you change the logic but not the interface then you will not run into compatibility issues.

Where you have to be careful is if the interface to the DLL is more than just the function signatures. For example if the original DLL accepted an int parameter but the new DLL enforced a constraint that the value of this parameter must be positive, say, then you would break old programs.

like image 104
David Heffernan Avatar answered Jan 23 '23 13:01

David Heffernan