Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.75/5 (3 votes)
See more:
What are .dll files? how can i create them in vb.net and can they be useful for my management software say I need to create Library management software for school or something?
Posted
Updated 5-Nov-12 9:16am
v2

Searching Google[^] would've gotten you all the answers you needed rather than posting it here.

Here is a good example[^] though.

Now, to answer your question, a dll[^] file, short for Dynamic Link Library is a library (obviously) a collection of small programs, which can be called upon when needed by the executable program (EXE) that is running. The DLL lets the executable communicate with a specific device such as a printer or may contain source code to do particular functions.

The advantage of DLL files is that, because they do not get loaded into random access memory (RAM) together with the main program, space is saved in RAM. When and if a DLL file is called, then it is loaded. For example, you are editing a Microsoft Word document, the printer DLL file does not need to be loaded into RAM. If you decide to print the document, then the printer DLL file is loaded and a call is made to print.

All in all a DLL is an executable file that cannot run on its own, it can only run from inside an executable file. This would be like having a car without an engine, where as an executable has an engine.

To do load a DLL file, an executable needs to declare the DLL function. A DLL may have many different functions in it. Then when needed the call is made with the required parameters.
 
Share this answer
 
are you searching this.
What is a Dll?[^]

waht is .dll file[^]

Wikipedia-.dll[^]


.dll files are created at compile time of the program/project in visual studio.
 
Share this answer
 
v2
Comments
Dave Kreskowiak 5-Nov-12 9:30am    
.dll file are created at runtime(compile) of the program/project in visual studio.

That made no sense at all.

Usually, .DLL's are created at compile-time, not run-time.
Abhishek Pant 5-Nov-12 9:32am    
means if you debug the program its auto created.
Abhishek Pant 5-Nov-12 9:35am    
now see the updated solution.
Geekbond's answer is good, but there are a few other reasons why libraries are a good idea, starting with code reuse. If you are part of a production shop, you can create a single library to encapsulate your branding: splash screens, icons, color constants, things like that. By using this library, the look and feel of your apps will remain consistent. Likewise, if you have a code base for database access, or special custom controls, put them in a separate DLL so that they are available for other applications.

Another advantage is that you can update DLLs without having to update your application. If your shop decides to rebrand, all you need to do is update the one DLL, and you are done. Likewise, you can put your business rules in a separate library: if those rules change, you can update the library and not tamper with the main app.

A third reason -- pretty arcane for most programmers, but it's still a good reason -- is extensibility. If you have a core application to which the customer can add optional features, you design those features as DLLs with a special interface. To activate a new feature, all you need to do is put the library in the app's plug-in folder, the app will use the library's interface and there you go. Adding new features to a plug-in? Just swap out the old DLL for the new.
 
Share this answer
 
Comments
Akinmade Bond 6-Nov-12 4:14am    
Nice.

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