|
From: Jason H. <jas...@bt...> - 2001-12-17 03:05:39
|
Seeing no other answers yet so I'll say what I know. A DLL or Dynamic Link Library is a way of way of distributing code that performs a task and is reusable. An ordinary library contains code for various functions, like the standard C and C++ libraries, and when used the library itself is added to the executable file and the only thing the compiler needs to know is the function prototypes. The code is connected to yours by the linker, which can sort out things like function call addresses/offsets. While this is fine for small and simple programs it becomes a problem for if you use many libraries because each adds to the size of your executable, and having several programs that use the same libraries will mean that there will be a copy of the same functions within several different executables. If a library changes, to fix a bug for example, then your code would need to be recompiled and the entire thing, which may be several megs, will need to be redistributed, or you would at least need to generate a patch. With a DLL the code is put into a seperate file and the system can be instructed to load in a particular DLL when needed, so your program can take advantage of the functionality the DLL provides. So the main executable is smaller for not having the extra code, you only need one copy of a DLL, saving disk space, and if several programs all need the same DLL at the same time then only one copy needs to be loaded into memory. An added benefit is that if you need to update the DLL, fixing bugs or adding new functionality, then all you need to replace is the DLL and you don't have to update all your executable that use it. That's the basic idea of a DLL, unfortunately I don't know much about creating and using them. I do know to use them then you have to instruct the system (Windows) to load in the DLL and you need to aquire information from the DLL to be able to call a specific function within it. Sometimes when using a particular library (such as DirectX) this part is done for you. Maybe there is a guide on the web somewhere that tells you the details of creation and use of DLL's. I think that different programming languages would have different mechanisms for making use of DLL's that fit with the complexity of the language. I hope this is of help, Jason. ----- Original Message ----- From: "Johnny Dessì" <jd...@da...> To: "Dev-Cpp" <dev...@li...> Sent: Sunday, December 16, 2001 5:38 PM Subject: Re: [Dev-C++] DLL's? > Nice Question! > I'd like to read some answer! > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |