Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is a DLL? What is it doing in our computer? Why we need to register it? Is DLL registration a common process of a single command? Is this installed/registered while we are installing a software?

share|improve this question

migrated from stackoverflow.com Jul 30 '09 at 14:31

This question came from our site for professional and enthusiast programmers.

4  
Yes, it is a legitimate - though very basic - question. But there's nothing wrong with basic questions. –  divo May 20 '09 at 10:21
    
You may have a virus. Have you done complete scans? And what, exactly, is the registration error you're seeing? –  goblinbox Aug 24 '11 at 3:23
add comment

5 Answers

DLLs are dynamic-link libraries:

Dynamic-link library, or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. These libraries usually have the file extension DLL, OCX (for libraries containing ActiveX controls), or DRV (for legacy system drivers).

See Dynamic-link library on Wikipedia.

share|improve this answer
add comment

A dll is a library of functions that can be used by other programs. Not all dll's need to be registered, that applies only to those that expose their fuctionality as COM objects.

Dll's can come from many places; a good number of them make up Windows as such, others come as part of various software that you install. Microsoft Office, for instance, registers dlls that exposes COM interfaces that allows other applications to incorporate functionality from the Office applications.

share|improve this answer
add comment

dll stands for "Dynamic Link Library". As the name implies, it is a collection of functions (libray) that is linked to your program dynamically during runtime (compared to static linking). Generally dll contain only function. "Modern" .NET dll contain normal .NET objects.

Dlls can be registered. This process (e.g. regsvr32 N:\ame.dll) makes this dll known for the operating system. As an alternative, the dll can be placed in the same directory as the executable or in a directory in the Path. A second alternative is to load the dll via Windows API (LoadLibrary()).

The normal procedure is to register the dll during installation or just copy it in the same directory as the executable.

share|improve this answer
add comment

A program is a series of instructions. Normally the computer will read and execute instructions one after another in series.

This is great, but most programs will do the same task at various times, or the same task with slight variations at various times. Rather than rewrite the instructions of that task over and over, an option available to programmers is to package those instructions into a subroutine or function.

Then, instead of copying the instructions over and over, you tell the program to call that function and therefore save space. Linking binds this function to all places that call it in the program, when the program is built. The program is also easier to maintain since, if you want to change that task, you can change it one place and not all over the program.

Most programs have functions that are used within that program. They are part of that program, loaded with it, and only accessible to that program.

But what if you have a great function (such as one that takes a date and returns the day of the week) and want to use it in many different programs? Dynamic Link Libraries, or .dll files in Windows, allow this. It's called dynamic linking because the linking occurs at runtime when program is loaded rather than at build-time when it is compiled (in this case it's called static linking).

You can package the function in a specific .dll, and then tell your main program you want to use, or import functions from that .dll.

Now, if you want to update what that function does, or fix bugs, you're in an even better situation since all you have to do is change the functions in one file and every program that uses it will be automatically updated. The disadvantage is now your program depends on another file to work properly. Usually the benefits outweigh the disadvantages for everything except emergency system recovery programs that need to work when you can't load anything from disk and such.

share|improve this answer
add comment

Let's not forget rundll32.exe. This Windows utility allows you to invoke a function exported in a dll. http://support.microsoft.com/kb/164787

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.