Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Can you please let me know as to why one should actually start writing Dynamic Linking Libraries.

How about the performance?

:)
Posted

When the functionality you put in your dll is going to be used by more than one module.
You could put it in a library but then it will be linked in your assembly/executable and eventually the same code is contained in multiple places. (multiple executables)
On top of this, if the code changes but the interface does not, you can change a dll without having to replace all the code that makes use of the dll.
Some libraries are very smart and offer you the possibility to choose between a dll and a lib. For instance MFC offers this choice. If you link, you get a bigger executable, containing the part of mfc you actually use, if you use a dll, well your executable will be smaller.
Code that is reusable should be put either in a library or in a dll, or you simply share the code all the time and compile and link it allways.
 
Share this answer
 
v2
Becouse with a dll you can load the function into memory when you need it, and kick it out of memory when not needed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900