Main Menu
Knowledge Base
Product Registration
Log an Incident
Request a Feature
Search Incidents/Bug Reports

Search KB

Please note: In an effort to better serve you, we are in the process of restructuring DevCenter. In the process, we have moved many items that you may be used to finding in DevCenter over to the Main Site. If you are having trouble locating something, please try looking at the following places:

Knowledge Base Article: KB0935

FAQ:Unable to register ActiveX controls

The information in this article applies to:
ALL (vAll)
  Article Created: 

Last Updated:

Article Type
Page Options
Average Rating:
5 out of 10

Rate this page
Print this page
E-mail this page
Add to Favorites


Imported From Original Protoview Article Reference Number:1006

When I try to register a control using regsvr32.exe, I get an error.

Additional Information

If regsvr32.exe fails to register a control, it typically means one of several things:

1. The path to the OCX specified is invalid.
2. The name of the control was not entered correctly.
3. One of the shared DLLs is missing, or incorrectly registered.
4. One of the shared DLLs is an incorrect version.

1. Make sure the regsvr32.exe and the OCX are in the same directory. Open a DOS Window and make the current directory the directory with the OCX and regsvr32.exe.

Type in the following at the prompt:

regsvr32 .ocx filename.ocx
where filename.ocx is the name of the OCX you are trying to register.
You should get one of the messages:

DllRegisterServer succeeded in .ocx.
Registeration succeeded.

1. DllRegisterServer failed. GetLastError returned , or LoadLibrary failed.
Continue to step 2.

2. Move the OCX to a directory that does not contain long file names, and repeat step 1.

3. Check to make sure the name of the OCX file was correctly entered. If it was not correctly entered go back to step 2. If is was correctly entered, continue to step 4.

4. In your /Windows/System directory (or System32 for NT), register OLEPRO32.DLL and MFC42.DLL. Also make sure that MSVCRT.DLL is present in the System (or System32 for NT) directory.
If registeration of these two files succeeded, then try to register the OCX. If OCX registeration fails, continue to step 5.

5. Depending on what version of Visual C++ an OCX was compiled with, different versions of the shared DLLs are necessary. If any of the shared DLLs are of an earlier version, you will need to get updated DLLs from Microsoft.
ProtoView contains these files on our Web Site, you can download them from the following URLs:

This file will update the support files necessary for ActiveX controls
This file will update the support files necessary for MFC.
Both these files are provided by Microsoft. Any support for them should be obtained by contacting Microsoft. ProtoView makes no guarantees to the use of these files. Once you have downloaded these files, you should run AXDIST.EXE on the target machine, then MFC42.EXE. After both have been run, you should then try to register the ActiveX control. At this point, you should be successful.

This is by design.

For additional information, please see following knowledge base article:

Microsoft's Knowledge Base Article: Q249873

How would you rate the quality of this content?
Poor -----------------------------------------> Outstanding

Tell us why you rated the content this way. (optional)