20

I know it is used to "Register or unregister a DLL". But I want more. Why do we need to register a DLL? When should we register a DLL?

3 Answers 3

21

It's used when registering COM components (one type of DLL) that various applications require.

By registering a DLL, you are adding information to a central directory (the Registry) for use by Windows. The information typically includes a "friendly name" for the component, which makes it easier to use from within another program, and the full path to the .dll or .ocx file which actually contains the executable code for the component (this allows Windows to find specific functions in the component which are available for use and to make calls to the executable code). When a software developer designs components to use this registration system this also helps to avoid software versioning problems since the information stored in the registry will normally reference the latest version of the component.

It will be very rare that you will need to use this yourself, but one common usage is to unregister and then reregister a DLL if you are experiencing problems or need to install a particular version.

Most of the time an application installer will call this behind this scenes.

You can use the Regsvr32 tool (Regsvr32.exe) to register and unregister OLE controls such as DLL or ActiveX Controls (OCX) files that are self-registerable. This may be necessary to troubleshoot some issues with Windows, Microsoft Internet Explorer, or other programs.

Source: Explanation of Regsvr32 usage and error messages

1
  • You often have to do it in Wine.
    – Ken Sharp
    Aug 11, 2017 at 21:51
6

Yep, its just like chrisF said, Here is a KB article from microsoft explaining it as well and Here is a KB article explaining what a DLL is. Think of them as library files for programs on your computer. They hold instructions on how to do different things for different programs. When you register it you are telling your computer that you have these instructions, where there at and programs that say they need them can use them now.

2
  • I still don't understand why the frig one would need to REGISTER a DLL. Why is it not enough to just dump it in the same directory in which the executable that needs it resides? Or just make it accessible by adding the path of the containing directory to the PATH environment variable?`
    – antred
    Jan 26, 2022 at 8:52
  • @antred if you have a new question then please use the Ask Question button at the top of the page.
    – Mokubai
    Jan 26, 2022 at 10:07
2

Re-registering dll's is common to do when fixing many Windows issues including repairing Windows Update when it stops working, see method 2, also see some of the links in "More Information" section

http://support.microsoft.com/kb/943144

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .