Home Computer Audio Asylum

Music servers and other computer based digital audio technologies.

DLL Hell

>It is many years since I was seriously involved in PC programming so >I may have forgotten, or things may have changed radically, BUT
>my understanding of DLLs is that they are shar(ed)(eable) libraries >of routines.

Yep. They can also contain executable/runnable code, see below.

>A given DLL will be loaded by the first app that requires it. Other >apps that need it will check that it is there before loading another >copy.

Yep. They can also be executed standalone, by the rundll system application, but they need to be specially designed to do this, and I think the practice is frowned upon nowadays.

>I am not sure what is responsible for unloading DLLs when they are no >longer required but, logically, there must be a DLL manager in the >OS.

The OS takes care of loading and unloading DLL's. In Linux it's an app called ld, in MacOS X it's dynld, in Windows it's just called the loader.

>Once loaded a DLL doesn't DO anything, ie doesn't consume processor >unless a routine is being called. Even then I cannot see any >difference between the routine being in the DLL or the main .EXE

Actually, once the process that requires the DLL terminates, the loader usually unloads the DLL.

>Basically it sits there lurking in memory .....

Sometimes, if it's not written very well, or the host process terminates poorly and doesn't release the DLL's resources. But usually
the loader is pretty smart and unloads the DLL if the host process goes away, or if the host process calls for the DLL to be unloaded explicitly. Keep in mind that, unless it's stuck in some sort of loop that's keeping resources open, the DLL does nothing unless there's an app actively calling it's functions. It may eat up some memory, however.

>So why the expressed concern about seeking and destroying all DLLs?

Because people don't understand how computers work.

>What am I misunderstanding / missing?

People think that a computer behaves just like any other piece of audio gear, and that you can significantly alter the way it works by futzing around with completely unrelated software.

/*Music is subjective. Sound is not.*/


This post is made possible by the generous support of people like you and our sponsors:
  Schiit Audio  


Follow Ups Full Thread
Follow Ups


You can not post to an archived thread.