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 :)
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordlen challenge 3 67
C# application error "Parameter Is Not Valid". 3 95
How to Convert a Quote to an Order in SalesForce 2 40
backup program with robocopy 6 16
A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 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