Solved

How to resolve the error message "ERROR 339 - COMPONENT 'COMCTL32.OCX' OR ONE OF ITS DEPEDENCIES NOT CORRECTLY REGISTERED: A FILE IS MISSING OR INVALID"

Posted on 2009-07-10
5
1,651 Views
Last Modified: 2013-11-26
Hi Experts:

    I have a program written in VB6 working fine on many computers, but returned the following error messages on some computers:
**********************************************************************************
ERROR 339 - COMPONENT 'comctl32.ocx' OR ONE OF ITS DEPENDENCIES NOT CORRECTLY REGISTERED: A FILE IS MISSING OR INVALID
**********************************************************************************

Here are my observations up to now:
1. The executable and some accompanied OCX/DLL files (including COMCTL32.OCX) are placed in a network drive.
2. I searched around and found COMDLG32.OCX and MFC42.DLL may be related, but then I found that a computer with the issue also have these two files.
3. The copy of COMCTL32.OCX on netword path be being used, because if I remove it the program will not work on a computer that it originally works.
4. A non-working computer does not have a copy of COMCTL32.OCX

Can I have some idea how to fix the error? Where to check and what to try?

Thank you!
0
Comment
Question by:huangs3
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:CSecurity
ID: 24830366
Type regsvr32 COMCTL32.OCX

in run or in cmd

Then run your program. COMCTL32.OCX should be in windows or system32 or in PATH
0
 

Author Comment

by:huangs3
ID: 24830665
Hi C Security:

     Do you mean COMCTL32.OCX must be registered?
     The COMCTL32.OCX I put on network drive together with the program is definitely not registered (because it is on a network drive), but if I remove it, the program wouldn't work. Does this indicate that COMCTL32.OCX does not need registeration?
      I want to avoid registering ocx files in computers because not too many users have administers privilege, and manually register ocx files may also not be approved...
 
0
 
LVL 17

Accepted Solution

by:
CSecurity earned 500 total points
ID: 24830686
That's not possible.

In each PC you want to run your program which needs comctl32.ocx, you have to copy comctl32.ocx to Windows or System32 or in PATH or near to your exe, then in RUN (Start Menu -> Run) or in Cmd.exe

You have to type:
regsvr32 comctl32.ocx
then press enter.

Then you can run your program, otherwise it's not possible. All ActiveXes should be regsvr32'ed in order to used by programs
0
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 24833001
It is possible to run with the OCX on the network drive, provided it is in the same location as the exe file. (the application folder)

BUT...
If someone or some other application has installed and registered the comctl32.ocx to the local machine (which is probably the correct thing to do!), then that installed version will be the one used, regardless of what is in the application folder.

if you create a package for your application and get all users to run that, it will install the ocx for you (and all others needed). The trick is to change the install package so that it references (not install) your exe on the network drive. That way you can post updated exe file without needing all users to reinstall. (At least until you update a required control).  

All this can be done using the VB Application and Package Wizard, as ive used it for 2 current projects and havent required a new package for quite a while.  If a new pc is rolled out, run the package once on it.
0
 

Author Comment

by:huangs3
ID: 24906058
Hi robertbaron:

    I found it is not possible, because I encountered a computer without comctl32.ocx, but the program still not running, so I think it is as what C Security said: it must be registered.

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to implement Singleton Design Pattern in Java.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

828 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