PDA

View Full Version : windows dll problems



manav
04-28-2008, 06:07 AM
Originally posted posted at: http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html



The library version can be specified when the shared object library is created. If the library is expected to be updated, then a library version should be specified. This is especially important for shared object libraries which are dynamically linked. This also avoids the Microsoft "DLL hell" problem of conflicting libraries where a system upgrade which changes a standard library breaks an older application expecting an older version of the the shared object function.


Then how they solve this problem on Windows?
Does it mean that all the pre-installed apps have to be reinstalled with the latest versions of apps using latest versions of .dll?

matsp
04-28-2008, 06:14 AM
Originally posted posted at: http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html



Then how they solve this problem on Windows?
Does it mean that all the pre-installed apps have to be reinstalled with the latest versions of apps using latest versions of .dll?

Well, the general way is that you don't "disturb" old functions in the DLL - anything that changes the behaviour of a function in such a way that it's noticable outside the function, it should become a new function, and new libraries call the new function.

But aside from programmers doing the right thing, there's no mechanism in Windows to account for DLL's changing.

--
Mats

manav
04-28-2008, 06:23 AM
Thanks Mats!
So if I had made a .dll and then i wanted to make some changes, then to avoid any problems i can just leave old functions as it is, and implement new functions, and, the new dl will still work, even for older apps. Right?

matsp
04-28-2008, 06:24 AM
Thanks Mats!
So if I had made a .dll and then i wanted to make some changes, then to avoid any problems i can just leave old functions as it is, and implement new functions, and, the new dl will still work, even for older apps. Right?

Yes.

Of course, this is of no importance if the .DLL and the .EXE are always distributed in pairs.

--
Mats