![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: dll files, help |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |
| |||
| DLL files are Dynamic Link Library files. Basically they are exectuables that get called into existence whenever the functions or methods are required. It works in the same way that classes can be used in VbScript, Java, javascript, PHP etc. The advantage is these functions and properties do not have to be loaded into memory on program start. They can be loaded and unloaded as and when required. This will reduce the memory footprint of the application __________________ Chris Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System |
| The Following User Says Thank You to chrishirst For This Useful Post: | ||
HelloWorld (07-21-2007) | ||
| |||
| Quote:
Ever called a predefined function for a windows app from an IDE? Used a function such as Left(), Right(), Mid(), Time(), Now() , read or written a windows property Screen.Height, App.Path. Displayed a value with MsgBox() in your code? These all come from DLLs If you code anything in .net for web use it gets compiled into a DLL by the server. DLL are coded in the same way that a class would be and they inherit nothing from the calling app. Testing will depend on what your IDE is capable of. Some will allow for inprocess DLL debugging, where the debugger can enter the code that is run in the DLL, others won't. One method of testing is to initially set the code for the DLL to run a part of the main application and test thoroughly then convert it into a library and test again. Personally I often build apps using DLLs both ActiveX and real ones I have a library of functions that I have built up over the years and include these into my apps with DLLs. __________________ Chris Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System |
| The Following User Says Thank You to chrishirst For This Useful Post: | ||
HelloWorld (07-21-2007) | ||
| ||||
| Quote:
What do you mean by this? Sorry, I don't really understand XD I used to use NUnit if you know? And they gave me other part of the codes where it will test the result of my code (bunch of try and catch). I really want to know what's behind this though.. ![]() |
| |||
| DLLs in Windows are basically the equivalent of "shared objects" (.so files/libraries) on Linux. The idea is that you can store functions in a shared library rather than a static library. The reason why the idea is there is due to the fact that whatever is needed from a static library (.lib on Windows, .a on Linux) is linked into the executable/binary itself. This could mean that if you use a lot of functions from that library, you may end up with a large executable/binary as well as a large memory hog for a program. ![]() If you link against a shared library however, that library is loaded into memory whenever it is needed after which the memory is freed (ideally). This results in smaller executable/binary as well as less memory usage. For an example, I just recently tried the D programming language again using the Digital Mars D compiler (dmd-1.018 to be exact). The minimalistic code: Code: void main () { } Simple point: shared > static (DLL > LIB, or so > a) in a lot of cases. __________________ "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off." -- Bjarne Stroustrup, creator of what is now known as C++ For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that. |
| The Following User Says Thank You to rpgfan3233 For This Useful Post: | ||
HelloWorld (07-21-2007) | ||
| |||
| It takes less memory because it is loaded during runtime as needed, then unloaded when it is no longer needed. Rather than having something like a 100K program in memory the entire time, you could link against a DLL and only have a little bit at a time. __________________ "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off." -- Bjarne Stroustrup, creator of what is now known as C++ For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that. |
| The Following User Says Thank You to rpgfan3233 For This Useful Post: | ||
HelloWorld (07-21-2007) | ||
| ||||
| I think what hes saying is it only calls the functions to memory as it needs rather than the program having the functions in it already, if it had the functions in the .exe rather than the .dll then it would be taking up more memory. |
| The Following User Says Thank You to Lee For This Useful Post: | ||
HelloWorld (07-21-2007) | ||
![]() |
| Thread Tools | |
| Display Modes | |
| |