• Main Menu
  • How to Register a DLL


    Dynamic Link Library files or DLLs are libraries of computer code and data that are used as shared resources on computers running the Windows Operating System (OS). A common task that arises for home computer users is figuring out how to register a DLL to allow the desired computer software to operate properly. The act of registering a DLL updates the Windows registry with the location and capabilities store in the file to permit proper application execution. The two options available to complete this task are through self-registration or manual action.

    What Is a DLL?

    A DLL (Dynamic Link Library) is a grouping of files that include both data and executables that are able to be used by one or more programs at the same time. The use of DLLs promotes code reuse by Windows applications developers and more efficient use of memory on computers running the Windows operating system (OS). Through the use of DLLs, program development is able to be modularized into separate components or modules enabling a faster load time of programs when these modules are loaded as the functionality is required. The use of DLLs also allows separate program modules to be updated without having to completely install new versions of programs saving time and bandwidth for consumers.

    What Are Common DLLs?

    There are a number of common DLLs used by two or many computer applications on the Windows OS. These include ActiveX Control, Control Panel, and Device driver files. For example:

    ActiveX Control Files (.ocx) – can perform a variety of reusable functions and are comparable to Java applets in their functionality. First introduced by Microsoft in 1996 as part of their Component Object Model (COM) and Object Linking and Embedding (OLE) technologies.

    Control Panel Files (.cpl) – There is a control panel file for every item located or listed in the Windows Control Panel. Each is a specialized file that may reference zero or more additional DLLs.

    Device Driver Files (.drv) – There are one or many device driver files for each hardware component installed on a Windows computer. One of the more prevalent are those installed for printers or network adapters.

    Advantages of Dynamic Link Library Files

    DLL files were developed and supported to increase performance and efficiency on computer programs running on the Windows OS. Some of the noted advantages for the use of DLLs include:

    –          Fewer computer resources are required to support common tasks. The use of DLLs can result in an overall decrease of the duplication of computer code loaded on the hard drive and placed in physical memory.

    –          Encourages the use of modular programming architecture. Aids developers that require multiple versions (for example basic to advanced support or multi-language), and supports dynamic loading of functionality at run-time.

    –          Reduces complications with program deployment and installation. If a specific functionality has to be updated or corrected within a support DLL, the entire program does not have to be upgraded or relinked with the DLL. All programs relying on the problematic file will benefit from the revision without further action. More frequently occurs with third-party DLL files.

    The Problem with DLL Dependencies

    When a computer application or dynamic link library uses a function call from another DLL, a dependency on that library is created. If changes are made to the supporting library, unintended consequences have been known to result placing the user in what is known in laymen’s terms as “DLL Hell.” Supporting programs may not execute at all or properly if any of the following DLL actions occur:

    –          Dependent DLL is “corrected” or “fixed” without analyzing the public interfaces that other programs may rely upon.

    –          Dependent DLL is upgraded to a new version that does not have backwards compatibility.

    –          Dependent DLL is overwritten with an older version of the library.

    –          Dependent DLL is removed from the computer.

    Microsoft refers to these actions as “DLL conflicts” that most commonly occur from lack of enforcement on the part of developers with backward compatibility. Although the problem was more prevalent on Windows OS applications that support legacy 16 bit editions, they can still arise today.

    How Microsoft Helps Us Avoid DLL Hell

    There have been a number of changes implemented by Microsoft to minimize the risk of DLL conflicts or dependency issues over the past several years. These include the incorporation of Windows File Protection, and Private DLLs.

    Under Windows File Protection, the OS precludes system DLLs from being deleted or updated by unauthorized programs. When a new or existing application installation attempts to update or remove a DLL that is protected, a valid digital signature must be presented. If there is not one, then the update or deletion is prevented by the OS.

    The use of Private DLLs is the second innovation deployed by Microsoft to help protect applications from changes made to shared DLL files. In this concept, the private DLL saves version specific data on the one or many DLL support files used by the program. In this concept, the private DLL tells the OS to use the version saved in the program root folder if the shared instance has been revised since application deployment.

    DLL Troubleshooting Tools

    There are a number of tools that have been deployed to help computer users and developers trouble shoot DLL issues on their computer. These include Dependency Walker, DLL Universal Problem Solver, Dlister.exe, Dcomp.exe, and Dtxt2DB.exe. The Dependency Walker tool recursively scans for all dependent DLLs used by a program and helps developers or power users document all of the DLLs used by a program. This can then help troubleshoot potential future issues incurred by operating system or third party application program updates. The tool is installed as par to Microsoft Visual Studio.

     

    Another common DLL troubleshooting tool is the DLL Universal Problem Solver. This application audits, compares, documents, and displays DLL information for a specific program or application. Deployed as part of this tool are support applications such as Dlister.exe that lists all DLLs installed on a given computer and saves the information to a text or data base file, Dcomp.exe that is able to compare DLLs listed in two text files and identify differences, and Dtxt2DB.exe which will load these text files into a dllHell database. The DlgDtxt2DB.exe combines these functionalities into a single program that uses a graphical user interface vice command line interaction.

    How to Self-Register a DLL File

    Most DLL files deployed today are self-registering as part of a computer program installation. The file(s) will include the relevant information to store them in the Windows OS registry and require no human intervention to do so. Once a self-registered DLL file is stored on a computer, they are accessible when required by one or many computer applications. Other file types that are capable of self-registration include ActiveX controls and Windows executable files. Of note, to manually remove a self-registered DLL file can require manual action on the part of the end-user.

    How to Manually Register DLL Files

    The second way or method to register DLL files on the Windows OS is through manual registration.

    Step 1 – Login to the computer with an account that has administrator or equivalent permissions.
    how to register a dll
    Step 2 – Click the “Start” menu button and enter “cmd” or “command” in the search text field depending on what version of Windows is installed on the computer.
    Step 3 – Enter regsvr32 “path and FileName.dll” at the DOS command prompt followed by pressing the “enter” key. The path is the actual location of the DLL file or directory on the computer’s hard or networked drive. A sample of this entry is:

    Regsvr32 “C:WindowsSystem32example.dll”

    Step 4 – After the DLL has been successfully registered on the computer, a dialogue box will be displayed confirming registration. The message will include the name of the newly registered DLL file and confirm entry into the Windows registry.

    Regsvr32 Command Line Options

    Regsvr32.exe is installed on computers running Microsoft Internet Explorer 3.0 or newer. For users who own 64 bit versions of the Windows OS, there are two versions of the DLL registration utility located on the computer:

    64-bit version is located here: %systemroot%System32regsvr32.exe.

    32-bit version is located here:  %systemroot%SysWoW64regsvr32.exe.

    The following command line options are available with either version of the utility program:

    /u – Unregister server

    /i – Call DllInstall passing an optional [cmdline].  When the switch is used with /u, will call dll uninstall

    /n – do not call DllRegisterServer. This command line switch has to be used with the /i option.

    /s – Silent mode. Do not display any message boxes (new since Windows XP)

    Command Line tool use:

    Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

    When the Regsvr32.exe application is run, it will attempt to load the identified component and then invoke the DLLSelfRegister function. If this works, then the success dialogue box will be displayed. If it does not work, an error message will be returned to the end-user which may or may not include an applicable Windows error code.

    Common DLL Error Messages

    Despite significant improvements in reducing DLL conflicts over the past several years, there are still a number of error messages that can result from attempting to register DLLs using the Regsvr32.exe tool. The following listing contains common errors along with potential causes for Windows Vista and newer versions of the Windows OS:

    The command-flag “”%1″” is not valid. Please review the command usage and try again.

    Cause: The user entered an invalid combination of command line switches or arguments when invoking the regsvr32.exe application.

    This command is only valid if a Microsoft Visual Studio OLE Custom Control project is opened.

    Cause: Microsoft Visual Studio invoked or ran the regsvr32.exe application but there were not modules included in the command line arguments.

    To register a module, you must provide a binary name.

    Cause: Regsvr32.exe was invoked or called with no modules to register located in the command line arguments..

    The command OleInitialize failed to run. Your computer might be low on memory. Close any open programs and then try again.

    Cause: The regsvr32.exe tool has to initialize the Microsoft COM library before calling the required COM library functions. It also has to unitialize the library when it shuts down. Typically results when either action has failed. If no cause can be determined, can sometimes be solved through restarting the computer system.

    The module “”%1″” failed to load.nn Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.nn%2.

    Cause: Windows had issues with loading the module identified in the command line. The specific error text will be provided as part of the message.

    The module “”%1″” was loaded but the entry-point %2 was not found.nnMake sure that “”%1″” is a valid DLL or OCX file and then try again

    Cause: The regsvr32.exe application was not able to locate the entry point to the module identified in the command line. This commonly results from improper entrypoint exportation from the module or if the file is not truly a DLL or .OCX file.

    The module “”%1″” was loaded but the call to %2 failed with error code %3.nnFor more information about this problem, search online using the error code as a search term.

    Cause: When regsvr32.exe invoked the entrypoint in the DLL module an error was thrown. The specific error code will be included with the displayed message.

    The module “”%1″” may not compatible with the version of Windows that you’re running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.

    Cause: Commonly occurs if the 32 bit version of regsvr32.exe is run with a 64 bit version of the DLL.

    Related Reading on Register a DLL:

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    20 comments
    1. Voyeur Adventures

      12 September, 2012 at 4:22 am

      I’m gone to convey my little brother, that he should also go to see this blog on regular basis to obtain updated from most recent information.

      Reply
    2. umashankar bhardwaj

      9 May, 2012 at 12:14 pm

      bass.dll was loaded,but the registerserver entry point was not found.
      this file can not be registered.

      I have problem. what can solve this problem.

      Reply
    3. suraj

      14 December, 2011 at 12:24 pm

      i used this command to delete registry REGEDIT4

      [-HKEY_CURRENT_USER\Software\VB and VBA Program Settings\showman] but when it was running the question box is coming like are u sure u want to add this information E:\showman.reg to the registry plez tell me how can i ignore it and without this process i can directly register it.

      Reply
    4. fred jones

      16 November, 2011 at 7:12 pm

      i need some help i installed a bar code reader program today and now when i got to run the program i get the following error

      Normal
      0

      false
      false
      false

      EN-US
      X-NONE
      X-NONE

      MicrosoftInternetExplorer4

      /* Style Definitions */
      table.MsoNormalTable
      {mso-style-name:”Table Normal”;
      mso-tstyle-rowband-size:0;
      mso-tstyle-colband-size:0;
      mso-style-noshow:yes;
      mso-style-priority:99;
      mso-style-qformat:yes;
      mso-style-parent:””;
      mso-padding-alt:0in 5.4pt 0in 5.4pt;
      mso-para-margin:0in;
      mso-para-margin-bottom:.0001pt;
      mso-pagination:widow-orphan;
      font-size:11.0pt;
      font-family:”Calibri”,”sans-serif”;
      mso-ascii-font-family:Calibri;
      mso-ascii-theme-font:minor-latin;
      mso-fareast-font-family:”Times New Roman”;
      mso-fareast-theme-font:minor-fareast;
      mso-hansi-font-family:Calibri;
      mso-hansi-theme-font:minor-latin;
      mso-bidi-font-family:”Times New Roman”;
      mso-bidi-theme-font:minor-bidi;}

      “the program cant start because ESVM40.dll is missing. Try reinstalling the program”i have tried uninstalling and reinstalling the program several times with admin credentials and it doesnt work. i installed the program on a seperate machine and it works fine. i went into the program folder and varified that the “missing” dll was there and it is but its still not working. any thoughts?

      Reply
    5. Dan Dascalescu

      19 September, 2011 at 8:00 am

      Wow, “Turn on the computer, which launches the Windows operating system.” ! Thank you for not omitting that most crucial step from this howto article which could be summarized to “regsvr32 <path/to/dll_file>”!

      Reply
    6. pinky

      17 August, 2011 at 9:55 am

      how to register dll file ( vbscript.dll ) using windows vista?. this is my assignment. I cant barely understand the instructions, probably you can post a much more detailed procedure. thanks
       

      Reply
    7. sankar s

      11 May, 2011 at 11:08 am

      can’t add reference to the specified file in vb6

      Reply
    8. vistavista

      4 December, 2010 at 7:28 pm

      I put the file into system32, the clicked run and typed:

      regsvr32 vistavista.dll

      ERROR: vistavista.dll was loaded, but the dllregistaryserver entry point was not found.

      Anybody have a solution? 😐

      Reply
      • Kris

        27 January, 2011 at 1:13 pm

        For the people with:

        ERROR: xxx.dll was loaded, but the DLLRegisterServer entry point was not found

        not all .dll files contain information that needs to be entered in  the registry.
        If you see the above error, the .dll file does not need to registered in order to be used by the OS or application.
        The error message is telling you “you tried to register a dll file but is does not contain any information that has to be in the registry”

        Reply
        • dave

          6 February, 2015 at 11:11 pm

          Did it means the dll files is not valid to be in the registry?

          Reply
    9. Daniel Memenode

      30 November, 2010 at 8:03 pm

      Originally posted by Marcelo Carvalho: “I have a dll that I sucessfully registered using regsvr32 but then when calling it via iis, I got the error ‘80020009’
      ../portal/functions/myfile.asp, line 18
      I already checked for permissions and the iis user can and execute read that file..”

      See if this helps.

      Reply
    10. Marcelo Carvalho

      30 November, 2010 at 11:08 am

      I have a dll that I sucessfully registered using regsvr32 but then when calling it via iis, I got the error ‘80020009’
      ../portal/functions/myfile.asp, line 18
      I already checked for permissions and the iis user can and execute read that file..

      Reply
    11. sadeer

      28 November, 2010 at 5:33 am

      Thank You So So much it Solved My Problem

      Reply
    12. RD17

      10 October, 2010 at 10:53 am

      This is a nice simple guide on how to register dlls, but I believe that in order to be able to work with dlls more extensively, like repairing etc..One should be able to understand the whole concept of dll itself. and the various error that arise with this kind of files. There are also a number of approaches on how to deal with windows registry dll, depending on the nature/cause of error.

      Reply
    13. Arno Jones

      20 August, 2010 at 7:47 pm

      I had to run a command prompt as administrator to make it work.
      Originally posted by Howard2008: “Tried manually registering the dll using:

      Regsvr32 “C:\Windows\TWAIN_32.dll”

      Got the error:

      C:\Windows\TWAIN_32.dll was loaded, but the DLLRegisterServer entry point was not found. The file cannot be registered.”

      Reply
    14. rezouro

      27 July, 2010 at 2:42 pm

      Howard 2008—–maybe you enter a wrong file name in command prompt, it should be like this…(C:\WINDOWS\system32\TWAIN_32.dll) right??hmmp..try it…thank you…. 😉

      Reply
    15. Daniel Memenode

      26 July, 2010 at 8:53 am

      What error yessica?

      Reply
    16. yessica

      25 July, 2010 at 9:03 pm

      quiero el dlls me marca error para instalar un
      programaaaaaaaaaaaaaaaaaaaaaaaa 🙁

      Reply
    17. Daniel Memenode

      22 July, 2010 at 4:57 pm

      Dllname is not a .dll or .ocx file. For example, typing regsvr32 wjview.exe generates this error message.Originally posted by Howard2008: “Tried manually registering the dll using:

      Regsvr32 “C:\Windows\TWAIN_32.dll”

      Got the error:

      C:\Windows\TWAIN_32.dll was loaded, but the DLLRegisterServer entry point was not found. The file cannot be registered.”

      Microsoft support pages have two explanations of that error:

      Dllname is not a .dll or .ocx file. For example, typing regsvr32 wjview.exe generates this error message.

      and

      Dllname may not be exported, or a corrupted version of Dllname may be in memory. Consider using Pview to detect the file and remove it.

      Some have also suggested running regasm with the /tlb option like this: regasm TWAIN_32.dll /tlb:TWAIN_32.tlb

      I hope this helps.

      Reply
    18. Howard2008

      22 July, 2010 at 6:21 am

      Tried manually registering the dll using:

      Regsvr32 “C:\Windows\TWAIN_32.dll”

      Got the error:

      C:\Windows\TWAIN_32.dll was loaded, but the DLLRegisterServer entry point was not found. The file cannot be registered.

      Reply
    Windows Registry
    186 queries in 0.536 seconds.