Solved

What is DLL file?

Posted on 2004-08-23
11
4,279 Views
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 ?

Regards
0
Comment
Question by:joy12345
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 45

Assisted Solution

by:sunnycoder
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.
www.gtscompanies.com/abbrev.html

Sunnycoder
0
 
LVL 20

Assisted Solution

by:Venabili
Venabili earned 20 total points
ID: 11868992
http://support.microsoft.com/default.aspx?scid=kb;en-us;87934 - Definition and Explanation of a .DLL file
"SUMMARY
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.

MORE INFORMATION
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."
0
 
LVL 20

Expert Comment

by:Venabili
ID: 11869011
sunnycoder,

>>Dynamic link libraries are stored in files with the DLL file extension.
Usually but not always :) Especially when speaking for Microsoft :)
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11869015
Venabili,

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)

Sunnycoder
0
 
LVL 20

Expert Comment

by:Venabili
ID: 11869022
:)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Expert Comment

by:DavidBirch2dotCom
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 www.davidbirch2.com/cgi-bin/ComicServer.dll/Index/

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

http://www.davidbirch2.com/cgi-bin/ComicServer.dll/Comic/?comic=1

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)

David
0
 

Author Comment

by:joy12345
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
regards
0
 
LVL 7

Accepted Solution

by:
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?

DAvid
0
 
LVL 3

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.

prashant
0
 
LVL 15

Expert Comment

by:babuno5
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.
0
 

Expert Comment

by:tpamenta
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
scoreUp challenge 14 56
endX challenge 2 63
mapAB Challlenge 35 124
Program to display an alert on Windows Toolbar 2 71
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now