What is DLL file?

Posted on 2004-08-23
Last Modified: 2008-01-09
What is .DLL file, can u explain me in detail with examples and its function, i see some of them in my system32 folder in windows are they same .dll file which i find in other program. what is the relation ?

Question by:joy12345
  • 3
  • 2
  • 2
  • +4
LVL 45

Assisted Solution

sunnycoder earned 20 total points
ID: 11868958
Hi joy12345,

Dynamic Link Library. A file of functions, compiled, linked, and saved separately from the processes that use them. Functions in DLLs can be used by more than one running process. The operating system maps the DLLs into the process's address space when the process is started up or while it is running. Dynamic link libraries are stored in files with the DLL file extension.

LVL 20

Assisted Solution

Venabili earned 20 total points
ID: 11868992;en-us;87934 - Definition and Explanation of a .DLL file
A dynamic-link library (DLL) file is an executable file that allows programs to share code and other resources necessary to perform particular tasks. Microsoft Windows provides DLL files that contain functions and resources that allow Windows-based programs to operate in the Windows environment.

DLLs most often appear as files with a .DLL extension; however, they may also have an .EXE or other extension. For example, Shell.dll provides the Object Linking and Embedding (OLE) drag and drop routines that Windows and other programs use.

Kernel.exe, User.exe and Gdi.exe are examples of DLLs with .EXE extensions. They provide code, data or routines to programs running in the Windows operating system. For example, one of these files provides the "CreateWindow" function that programs use when a new window is created on the screen.

In Windows, an installable driver is also a DLL. A program can open, enable, query, disable and close the driver based on instructions written in the DLL file.

DLLs may be found in the Windows directory, Windows\System directory or in an program's directory.

If a program is started and one of its DLL files is missing or damaged, you may receive an error message like: "Cannot find xyz.dll". If a program is started with an outdated DLL file or mismatched DLL files, the error message "Call to undefined dynalink" may be displayed. In these situations, the DLL file must be obtained and placed in the proper directory in order for the program to run correctly."
LVL 20

Expert Comment

ID: 11869011

>>Dynamic link libraries are stored in files with the DLL file extension.
Usually but not always :) Especially when speaking for Microsoft :)
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 45

Expert Comment

ID: 11869015

I realized that ... so lets change it to
Dynamic link libraries are generally stored in files with the DLL file extension.

but DLL extension will be a dynamic link library unless you are working on a crazy system or a crazy person's system ;o)

LVL 20

Expert Comment

ID: 11869022

Expert Comment

ID: 11869577
I regularly use ISAPI dll's for creating complex web server applications, I know this isn’t the most common use for them, however you can get an idea of what is within them and how they are used just by browsing a project,

Go to

You can see the file name ComicServer.dll, within that there are various functions in this case separated by //'s each function can have variables passed to it such as this

The function is called Comic and it has a variable named comic passed to it with the value of '1'

Before all the other experts get at me ;) I know most Dll's do not work exactly like this, however they do have the same characteristics, various functions within them and you may pass variables to them as in the above example.... this idea was simply to illustrate the way a Dll file works ;-p)


Author Comment

ID: 11869934
So does all the program have .ddl file, i mean when i intall new program does that program also have .dll file? So to communicate with my machine does this .dll file has to communicate with my OS ddl file?
or ??? please expain me

Accepted Solution

DavidBirch2dotCom earned 20 total points
ID: 11870036
Many programs do not need Dll's, however some programs do, this is usualy to make things simpler for the programmer, they can put all the code to do with certain events into one 'container' which is easier to access (see above example).  

Yes some programs rely on windows dll's for certain functions such as printing, regestry, music ect...

Most Dll's are not applications in them selfs, they are usualy called by other applications to do specific jobs such as printing.

Also Dll's can be used to hold resources such as images, word lists error messages and codes, ect

the best way to think of a dll is as  a libary (u know the real thing with books and stuff ;) ) with hundreds of books which could be thought of as various resources/functions/procedures and a person standing at the front desk... when a program wants to use a dll it loads it, as you would walk upto the libary, it calls a function and prehaphs passes some imformation, you ask for a book, the dll (libarian) then goes and gets it/ carries out the function and hands you the result,  WITHOUT you haveing to worry about the filing system, how the procedure works and all things like that, it provides a simple interface for complex data and procedures

hope thats more clear?


Expert Comment

by:Prashant Sabnekar
ID: 11931244
A Dynamic Link Library is that file which becomes the part of the code at run time.
A program may contain some library function. Normally the declerations of library functions are available at the header file(.h) file, the definition part is available at some other file which is pre-compiled, and ready to link at the run time.

LVL 15

Expert Comment

ID: 11950095
the question is what many have a doubt about .
in short DLL is a dynamic link library.

If an ActiveX component has been implemented as part of an executable file (EXE file), it is an
out-of-process server and runs in its own process. If it has been implemented as a dynamic link library
(DLL file), it is an in-process server and runs in the same process as the client application.
If your ActiveX component is an out-of-process server, it is an EXE file, and can run standalone.
Applications that use in-process servers usually run faster than those that use out-of-process servers
because the application doesn’t have to cross process boundaries to use an object’s properties, methods,
and events.
There are a few reasons why you may want to create your ActiveX document as an in-process
component (DLL file). The performance of an in-process component surpasses that of the same
component compiled as an EXE. In addition, multiple programs accessing the same EXE can overwrite
global data; that doesn’t happen if they each have their own in-process server.

Expert Comment

ID: 12109907
I find that relying on DLLs can become a pain.  WHen a program has to be installed by multiple users at diverse locations, it seems that the DLL libraries are never the same and maintaining a common set of DLLs across all users becomes impossible. So if possible, I try to compile and build executible modules that do not use the DLLs.

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Scripting vs. Programming languages 25 179
tvirtualstringtree freeze when load too manny images 10 73
This code tracks birthdays 3 82
Cygwin - GNU GPL License 1 37
This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question