Click to See Complete Forum and Search --> : MSCOMCTL.OCX is missing


rickmd
May 17th, 1999, 11:38 AM
Every time I open a new/existing project or try to deploy a project the following error occurs "Component mscomctl.ocx or one of its dependencies not correctly registered. A file is missing or invalid". The OCX does not exist on my PC or the VSE6 CD's.

This started after installing one of the projects from the book "Mastering Visual Basic 6". Can I delete this entry from the registry? Or do I have to find this OCX and install it somehow? Any suggestions would be appreciated. The OCX was not delivered with the book, and I'd just as soon remove the reference rather than fix it, if possible. I am not very familiar with registry editting.

Thanks,
RickMD
(VSE6, VB6, VC++ on WinNT4.0)

Lothar Haensler
May 17th, 1999, 11:47 AM
IMHO this OCX should exist on your machine, because it hosts the Windows common controls (or at least an interface to the corresponding DLL). I'd try reinstalling VB 6 instead of playing around with those registry keys.

rickmd
May 17th, 1999, 12:19 PM
Thanks for the suggestion, I already re-installed VB6, that didn't work. I believe this OCX was replaced by mscomct32 or some other library, although I can't verify that.

Ravi Kiran
May 17th, 1999, 08:26 PM
Hi,

The dll that supports Windows Common Controls is ( or used to be) ComCtl32.ocx, atleast in Win'95 ( and VB 5.0) Is its name changed to MSCOMCTL.ocx in vb 6.0?... I doubt?!!. Even if it changes, both should exist...

In this series, there seems to be some confusion about the 'Common Controls' or 'Comm' control!!
Which one is refered?

I would suggest the following, for diagnosis:
Open the .vbp file, of the project downloded from 'mastering..' CD in Notepad. (i.e Dont double click it, but drag and drop on to a Notepad instance). Check the lines that say something like (For VB 6.0 the format may be a little different, this is from 5.0):
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.0#0; COMCTL32.OCX

Notice the version, Ex:#1.0#, for the OCX you suspect is giving trouble.

The open registry editor, regedit. Give a search Cntrl+F for the same ocx name. You should get a hit under \H_key_classes_root\clsid\xxxxx\Inprocserver32
Click on "TypeLib" It should show the same value as in 'object =' line i.e, for our Ex: {6B7E6392-850A-101B-AFC0-4210102A8DA7}. Click on the 'Version' and note it.
You may hit multiple ClsIds all being supported by same Ocx.

Then go to H_key_classes_root\typelib and then search again. You should hit upon the same ocx name under the same interface id. Ex: {6B7E6392-850A-101B-AFC0-4210102A8DA7}. It should contain all the versions. and if you dont find the ver no as in the vbp file, then some thing is wrong.

You can also cross verify with project files, that you created before the trouble started!.

This is as far as detecting is concerned.
If you find differences, then i dont know how to correct. There are a few tools on the net for this purposes. You can down load. ..

All the Best :-)

Ravi

Chris Eastwood
May 18th, 1999, 04:26 AM
Hi Ravi

>The dll that supports Windows Common Controls is ( or used to be)
>ComCtl32.ocx, atleast in Win'95 ( and VB 5.0) Is its name changed to
>MSCOMCTL.ocx in vb 6.0?... I doubt?!!. Even if it changes, both should
>exist...

I'm afraid that MSCOMCTL.OCX is VB6's own version of the Common Controls (ListView / ImageList etc). It's also statically created so that any new changes in the underlying DLL's with IE are not going to be reflected in this OCX (this has been treated with howls of derision by most VB API groups).

But yes, If you have VB6 on your computer - you *must* (should?) have this OCX on your machine somewhere.

You can still reference the old version and use that in your project though (it just means you have to use API calls to get the same effects on the controls).


By the way, Microsoft offer a tool that will automatically upgrade a VB 5 project using Comctl32.ocx to the newest version (it's a real pain trying to do it manually) :

http://support.microsoft.com/support/kb/articles/Q190/9/52.asp


Regards

Chris Eastwood


CodeGuru - the website for developers
http://www.codeguru.com/vb