Register the DLL file in Windows OS. How to register files *.dll, *.ocx List of registered dlls in the system

After installing various programs or games, you may encounter a situation where, when turned on, an error occurs “The program cannot be launched because the required DLL is not in the system.” Despite the fact that Windows family OSes usually register libraries in the background, after you download and place your DLL file in the appropriate place, the error still occurs and the system simply "does not see" it. To fix this, you need to register the library. How this can be done will be discussed later in this article.

There are several methods to fix this problem. Let's consider each of them in more detail.

Method 1: OCX/DLL Manager

OCX/DLL Manager is a small program that can help you register a library or OCX file.

For this you will need:

  1. Click on a menu item "Register OCX/DLL".
  2. Select the type of file you want to register.
  3. With button Browse specify the location of the DLL.
  4. Click on the button Register and the program will register the file itself.

OCX / DLL Manager can also unregister a library, for this you need to select the menu item "Unregister OCX/DLL" and subsequently do all the same operations as in the first case. You may need the undo function to compare the results when a file is activated and when it is disabled, as well as in the process of removing some computer viruses.

During the registration process, the system may give you an error saying that administrator rights are required. In this case, you need to run the program by right-clicking on it, and select "Run as administrator".

Method 2: Run menu

You can register a DLL using the command "Run" in the start menu of the Windows operating system. To do this, you will need to do the following:


Method 3: Command line

Registering a file via the command line is not much different from the second option:

  1. Choose a team "Run" on the menu "Start".
  2. Enter in the opened input field cmd.
  3. Click "Enter".

You will see a window in which you will need to enter the same commands as in the second option.

It should be noted that the command line window has a function to paste copied text (for convenience). You can find this menu by right-clicking on the icon in the upper left corner.

Method 4: Open with


Possible mistakes

"The file is not compatible with the installed version of Windows"- which means you are most likely trying to register a 64-bit DLL on a 32-bit system, or vice versa. Use the appropriate command described in the second method.

"Entry point not found"- Not all DLLs can be registered, some of them simply do not support the DllRegisterServer command. Also, the occurrence of an error can be caused by the fact that the file is already registered by the system. There are sites that distribute files that are not really libraries. In this case, of course, nothing will be registered.

In conclusion, it must be said that the essence of all the proposed options is the same - they are just different methods for launching the registration command - as it is more convenient for anyone.

Dll, ActiveX not registered under Windows 7 - what to do?

In Windows familiar to everyone up to and including XP, registration of Dll, ActiveX components was performed without problems by the regsvr32 command.

In Windows 7, in principle, the same thing, but some "improvements" have been made, which is why the usual procedure often does not give the expected result. For example:

Agree, very clear and informative message. An excellent opportunity for an OS developer is to offer the user to purchase and release Windows 8, a new, even more improved version, where this message will possibly be translated into human language.

Namely: the terminal window (command line, cmd) should be opened with the "Run as administrator" command (accessible by pressing the right mouse button).

In most cases, it solves the problem.

Additional steps may be required if a 64bit version of the OS is being used. The fact is that the programs in it can be not only 64-bit but also 32-bit. Moreover, most programs are 32-bit, because 64-bit is useful only for resource-intensive applications.

In particular, the client part of 1C (that is, the 1C with which the user works) is a 32-bit application. (Here, the 1C server can already be both 32-bit and 64-bit, but this applies to large organizations, if you have 1C Accounting and 5 users, then 99% that you have no 1C server and everything is 32-bit).

ActiveX components can also be 32-bit or 64-bit, and the version that matches the bit depth of the application must be used. OcvitaBarcode ActiveX is a 32 bit application.

So, the programs for registering 32-bit and 64-bit ActiveX in Windows 6 64-bit are also different, but they are both called regsvr32.exe. (As Kozma Prutkov said, "if "buffalo" is written on the cage with the elephant, do not believe your eyes.") Therefore, if you simply type in the command line

regsvr32 some .ocx

then in theory the necessary regsvr32 should start, in practice anything can start. Why is this done? Well, everything is for the same, if you immediately do it humanly, who will buy the new version of Windows.

Therefore, to guarantee the launch of 32-bit regsvr32, you should type the command in the terminal window

c:\windows\syswow64\regsvr32.exe OcvitaBarcode.ocx

If windows is not installed in c: \ windows, then the path is natural, we indicate which one is. And remember that the terminal window should be opened as an administrator.

Subject to the above rules, 32-bit ActiveX, incl. OcvitaBarcode ActiveX work without problems in Windows 7:


Multi-component object model ( C component O object M dress- COM) is the main means of interaction between programs of any type: libraries, applications, system software, etc. and defines a standard mechanism by which one piece of software (server) provides its services to another (client), which is ensured by the use of certain protocols for interaction between them (between client and server). The server can be a dynamic link library (DLL) that is loaded while the application is running, or a separate independent process that can be a component of an application or system program, or even a process running on another computer. To find the server needed by the client, special information is used from the Windows registry, which is generated during registration server in the system, most often in the form of a dynamically loaded DLL module. Registration is required because programs do not work with the DLL, OCX, ACX, EXE files themselves, but with objects that represent a specific set of programming interfaces. The following registry keys are used to register a DLL:

HKLM\SOFTWARE\Classes\CLSID- when registering COM-objects of libraries for all users of the system;

HKCU\SOFTWARE\Classes\CLSID- when registering COM-objects of libraries only for the current user;

HKLM\SOFTWARE\Wow6432Node\Classes\CLSID- for registering 32-bit DLLs in 64-bit Windows OS;

Upon registration, a key is created in the specified registry key with a name equivalent to the globally unique identifier GUID registered object. A COM GUID is a class identifier. To distinguish class identifiers from other identifiers, they use a registry subkey named CLSID. The GUID is a 128-bit hexadecimal value enclosed in curly braces:

(23170F69-40C1-278A- 1000-000100020000

When registering, a subsection is created in the registry with a name corresponding to the GUID, containing information about the path and name of the executable file, its version, registration time, information about the developer, and other parameters that determine the specific properties of the object being registered. Deletion or corruption of registration data causes the registered system component or application to not work, usually accompanied by a DLL lookup error message and a suggestion to reinstall the problematic software. Instead of reinstalling, it is quite possible to get by with re-registration of a damaged object using the utility regsvr32.exe, which is available in all versions of operating systems of the Windows family.

Utility regsvr32.exe is a standard command-line tool for registering and unregistering OLE controls, ActiveX controls, and DLLs in the Windows registry. On 64-bit versions of Windows, there are two versions of the file regsv32.exe:

64-bit version in directory %systemroot%\System32(usually - C:\Windows\System32)

32-bit version in directory %systemroot%\SysWoW64(usually C:\Windows\SysWoW64)

The utility requires elevated privileges to work, so the command prompt window must be called with administrator rights (“Run as administrator”).

At startup regsvr32.exe without command line parameters, or when run with invalid parameters, a tooltip is displayed:

REGSVR32 command line format:

Regsvr32] DLL file

/u-- calls DllUnInstall, unregisters the server

/i- calls DllInstall, passing it an optional command_string as a parameter;

/n- does not call DllRegisterServer; can be used with the /I switch;

/s– "silent" mode; message boxes are not displayed;

Examples of using regsvr32.exe:

regsvr32 /u "C:\Program Files\7-Zip\7-zip32.dll"- Unregister the specified DLL. Upon successful cancellation, a message is displayed:

To suppress the output of a message, use the parameter /s:

regsvr32 /u /s "C:\Program Files\7-Zip\7-zip.dll"

As a result of executing this command, the 7-Zip archiver item will disappear from the context menu of Windows Explorer, called by the right mouse button. To restore it, you need to register 7-zip.dll with the command:

regsvr32 "C:\Program Files\7-Zip\7-zip.dll"

You must not forget about the bitness of registered objects in 64-bit versions of the OS. If you need to register a 32-bit object, you must explicitly specify the path for the 32-bit edition of the utility regsvr32:

%SystemRoot%\syswow64\regsvr32.exe

Or without using environment variables:

C:\Windows\System32\regsvr32.exe

As an additional software tool for managing COM object registration, it is very convenient to use a free utility from Nirsoft RegDLLView.exe. The program does not require installation in the system, has a small size and allows you to:

Get a convenient list of all objects registered in the system.

Perform registration or unregistration of the selected objects.

Create a .reg file to perform unregistration of one or more DLLs.

Register or re-register the specified file.

In addition, it is possible to check the digital signatures of executable files of registered objects, view or change their properties, as well as launch the registry editor with the information of the selected GUID displayed through the right-click context menu item "Open in Regedit".

To put it very simply, what .dll files, What .ocx files- These are system "libraries" necessary for the normal launch and stable operation of programs.

There are several reasons why you may see errors associated with these files:

  • The installation was not performed correctly and the necessary files were not copied and registered (not all files require registration)
  • Damage to entries in the registry / program files, etc.

Actually, 2 solutions follow from this:

  • Reinstalling the program
  • If reinstallation did not help, then self-downloading the necessary files and their subsequent registration

This article is written solely on the basis of the personal experience of the author. All advice given here, you perform at your own peril and risk. No one is responsible for your actions.

Let's take a closer look at the second solution. These files can be placed in the folder \WINDOWS\System32, or in the program folder. Therefore, in the error window, look at the name of the file we need, find it on the Internet, download and copy it to both folders - S ystem32 and application folder. Now it's time to register the file (if required).

Registering .dll, .ocx files

You can do this action in several ways:

  1. Manual registration of files in the registry branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs (NOT RECOMMENDED). To do this, in this branch we create a parameter REG_DWORD with full file address , for example C:\WINDOWS\System32\MSCOMCTL.OCX and with meaning 1 .
  2. Quick registration. Click Win+R enter in the field regsvr32 filename, For example regsvr32MFWMAAEC.DLL, and press Enter.
  3. Click Win+R enter in the field cmd. The command line will open. Similarly to the previous method, we enter regsvr32 filename.
  4. Files can also be registered using the utility Total Commander.

If the registration was successful, you will see a corresponding message.

Note

Along with the regsvr32 command, you can additionally use various keys.

regsvr32 ] dll file

/u– unregister DLL;

/s– "silent" mode, additional messages are not displayed;

/i– calls the DllInstall service, passing an optional command string as a parameter, when used with the /u switch, calls the DLLUnInstall service;

/n– does not call the DllRegisterServer service; this can be used with the /i switch.

Tweak for the system

Allows you to add file registration and unregistration functions to the Explorer context menu. For this we create .reg file(save with notepad) txt file and change its extension to .reg. You can read how to enable the display of extensions in this article -) of the following content:


@="regsvr32.exe \"%1\""


@="regsvr32.exe /u \"%1\""


@="regsvr32.exe \"%1\""

Let's run the resulting file.

If you want to remove these functions from the context menu, then the following code is executed:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\dllfile\Shell]

[-HKEY_CLASSES_ROOT\dllfile\Shell\Registration]

[-HKEY_CLASSES_ROOT\dllfile\Shell\Registration\command]
@="regsvr32.exe \"%1\""

[-HKEY_CLASSES_ROOT\dllfile\Shell\Unregister]

[-HKEY_CLASSES_ROOT\dllfile\Shell\Unregister\command]
@="regsvr32.exe /u \"%1\""

[-HKEY_CLASSES_ROOT\ocxfile\Shell]

[-HKEY_CLASSES_ROOT\ocxfile\Shell\Registration]

[-HKEY_CLASSES_ROOT\ocxfile\Shell\Registration\command]
@="regsvr32.exe \"%1\""

Do you have any questions? Do you want to complete the article? Did you notice an error? Let me know below, I'll be sure to hear from you!

If this article helped you, then write about it in the comments. And don't forget to share the article with your friends on social networks;)