|
From: Daniel G. <sp...@ho...> - 2001-12-17 09:10:28
|
<html><div style='background-color:'><DIV> <P>Hey Jason,</P> <P>Nice description, very informative. Thanks from me!</P> <P>Daniel</P> <P><BR><BR> </P></DIV> <DIV></DIV> <DIV></DIV>>From: "Jason Hardman" <JAS...@BT...> <DIV></DIV>>To: "Dev-C++" <DEV...@LI...> <DIV></DIV>>Subject: Re: [Dev-C++] DLL's? <DIV></DIV>>Date: Mon, 17 Dec 2001 02:15:58 -0000 <DIV></DIV>> <DIV></DIV>>Seeing no other answers yet so I'll say what I know. <DIV></DIV>> <DIV></DIV>>A DLL or Dynamic Link Library is a way of way of distributing code that <DIV></DIV>>performs a task and is reusable. An ordinary library contains code for <DIV></DIV>>various functions, like the standard C and C++ libraries, and when used the <DIV></DIV>>library itself is added to the executable file and the only thing the <DIV></DIV>>compiler needs to know is the function prototypes. The code is connected to <DIV></DIV>>yours by the linker, which can sort out things like function call <DIV></DIV>>addresses/offsets. While this is fine for small and simple programs it <DIV></DIV>>becomes a problem for if you use many libraries because each adds to the <DIV></DIV>>size of your executable, and having several programs that use the same <DIV></DIV>>libraries will mean that there will be a copy of the same functions within <DIV></DIV>>several different executables. If a library changes, to fix a bug for <DIV></DIV>>example, then your code would need to be recompiled and the entire thing, <DIV></DIV>>which may be several megs, will need to be redistributed, or you would at <DIV></DIV>>least need to generate a patch. <DIV></DIV>> <DIV></DIV>>With a DLL the code is put into a seperate file and the system can be <DIV></DIV>>instructed to load in a particular DLL when needed, so your program can take <DIV></DIV>>advantage of the functionality the DLL provides. So the main executable is <DIV></DIV>>smaller for not having the extra code, you only need one copy of a DLL, <DIV></DIV>>saving disk space, and if several programs all need the same DLL at the same <DIV></DIV>>time then only one copy needs to be loaded into memory. An added benefit is <DIV></DIV>>that if you need to update the DLL, fixing bugs or adding new functionality, <DIV></DIV>>then all you need to replace is the DLL and you don't have to update all <DIV></DIV>>your executable that use it. <DIV></DIV>> <DIV></DIV>>That's the basic idea of a DLL, unfortunately I don't know much about <DIV></DIV>>creating and using them. I do know to use them then you have to instruct the <DIV></DIV>>system (Windows) to load in the DLL and you need to aquire information from <DIV></DIV>>the DLL to be able to call a specific function within it. Sometimes when <DIV></DIV>>using a particular library (such as DirectX) this part is done for you. <DIV></DIV>>Maybe there is a guide on the web somewhere that tells you the details of <DIV></DIV>>creation and use of DLL's. I think that different programming languages <DIV></DIV>>would have different mechanisms for making use of DLL's that fit with the <DIV></DIV>>complexity of the language. <DIV></DIV>> <DIV></DIV>>I hope this is of help, Jason. <DIV></DIV>> <DIV></DIV>>----- Original Message ----- <DIV></DIV>>From: "Johnny Dessì" <JD...@DA...> <DIV></DIV>>To: "Dev-Cpp" <DEV...@LI...> <DIV></DIV>>Sent: Sunday, December 16, 2001 5:38 PM <DIV></DIV>>Subject: Re: [Dev-C++] DLL's? <DIV></DIV>> <DIV></DIV>> <DIV></DIV>> > Nice Question! <DIV></DIV>> > I'd like to read some answer! <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > _______________________________________________ <DIV></DIV>> > Dev-cpp-users mailing list <DIV></DIV>> > Dev...@li... <DIV></DIV>> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://go.msn.com/bql/hmtag3_etl_EN.asp'>Click Here</a><br></html> |