Solved

Run time Error, missing comdlg32.ocx file

Posted on 2008-10-28
7
1,553 Views
Last Modified: 2012-05-05
One of our users is getting this error when running an application and getting to a certain point.

It comes up with 'Run-Time Error '339' Component 'comdlg32.ocx' not correctly registered: File is missing or invalid.'

Now I have followed the instructions on similar posts and have downloaded the comdlg32.ocx file and ran 'regsvr32 c:\windows\system32\comdlg32.ocx'.

This brings up a success message when run, however, the application still throws up the error!
I carried out the same procedure on another laptop with the same issue and it worked fine.

Any ideas on what else I could try out?
0
Comment
Question by:alfatech1
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Accepted Solution

by:
torimar earned 250 total points
ID: 22823945
This .ocx control comes in different versions belonging to different versions of VB/VS.
Newer files are downward compatible, but if you happen to have downloaded an older version of the file than the one required by the application, it will not be accepted.

Right click the file and select 'Properties' > 'Version',  take note of date and version number, and google for it again. Then try to download a newer version; like maybe this one:
http://www.ocxdump.com/download-ocx-files_new.php/ocxfiles/C/COMDLG32.OCX/6.01.9782/download.html

Repeat the registration process.

Btw: There is not only a "comdlg32.ocx", but also a "comdlg32.dll". Are you sure the error messages kept referring to the same file all the time?
0
 
LVL 4

Expert Comment

by:Fiuca
ID: 22825109
You can try to run depends.exe, it fixed a similar problem for me a month ago:
http://www.dependencywalker.com/

0
 
LVL 4

Assisted Solution

by:Fiuca
Fiuca earned 250 total points
ID: 22825182
Per Microsoft:

Depends.exe
The Dependency Walker, Depends.exe, is used to determine the explicit dependencies a file has. A dependency is a secondary file, which is necessary for a file to load/run properly. For example, a Microsoft Visual Basic application is dependent upon the Microsoft Visual Basic run-time files.

Depends.exe also presents plenty of valuable information about dependent components, such as their export table, internal version number, and so forth.

Depends.exe ships with Microsoft Visual Basic and is located on the installation CD's at the following location:
\Common\Tools\VB\Unsupprt\Depend
Copy all the files from the Depend folder into the System (or System32) folder.

To use depends.exe, perform the following steps:
1.      From the Windows Start menu, choose Run.
2.      Type in the path and name to the Depends.exe file. You can also run the Depends.exe file by double-clicking the file through the Windows Explorer. Once Depends.exe executes at least once on your system, you may right-click any .exe, .dll, .ocx or other file and select View Dependencies from the shortcut menu to launch the Depends.exe file.
3.      When Depends.exe launches, select File and then choose Open.
4.      Browse in the Open dialog box for an .exe, .dll, or .ocx file and then click Open.
5.      The explicit dependencies for that particular component will appear.

For more information on the Depends.exe file, please refer to the Utilities On-line help.

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:alfatech1
ID: 22825857
Thanks for the suggestions, I will give these a try and let you know how I get on.
0
 
LVL 35

Expert Comment

by:torimar
ID: 22828281
@Fiuca:
The dependency walker is indeed a nice programme, and I've always liked it a lot, but it displays the version numbers of the depending libraries as they are installed on your system, it does not show the exact version number of a library that the examined executable was compiled with.

The only way I know of that will give you the exact version number of a library that was used while developing an application is by looking at the setup.LST file produced by the Deployment Wizard. This can, of course, only be done on the system where the application was compiled, viz. by its programmer.

The Dependency Walker may be used to troubleshoot an .ocx/.dll that won't register (by exploring and profiling regsvr32.exe as explained here: http://www.dependencywalker.com/faq.html), but in the present case the control registers ok, so no use either.
0
 

Author Comment

by:alfatech1
ID: 22830260
Tried downloading a newer version of comdlg32.ocx and registered this file but it still comes up with the same error message - 'comdlg32.ocx not correctly registered'.

Have downloaded and ran dependency walker. Ran depends.exe and opened the comdlg32.ocx file and it had reported 2 errors/warnings. The first was a missing msjava.dll file, which I have now downloaded and copied to the system32 folder. The other warning I am not sure about, so need a little help with this:

It is coming up with 'Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.' for file 'c:\windows\system32\MPR.DLL'.

How do I fix this one? Also, do I need to register the msjava.dll file or is it enough just to copy it to the system32 folder which I have already done?

Thanks
0
 

Author Comment

by:alfatech1
ID: 22831165
Hi have sorted it now. I had another user log onto the laptop and the application worked fine for them.

Recreated the affected users' profile and it has fixed the run-time error.

Thanks for your inputs, I will spread the points out equally.
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now