Click here to Skip to main content
15,355,537 members
Articles / Programming Languages / Visual Basic
Tip/Trick
Posted 6 May 2022

Tagged as

Stats

7.3K views
8 bookmarked

Fixing Unregistered .OCX Files in Running Legacy Application on Windows 10 (64-bit)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
18 May 2022CPOL2 min read
How to install and register .OCX components for legacy application
If you run a legacy application on Windows 10, you may run into an error message that says one .OCX component is not registered. This tip explains where to find these components and how to register them on Windows 10. I believe this trick will make this legacy app to work on Windows 11 too.

Introduction

I obtained a legacy copy of software written in 2002 without any documents. When I run it on Windows 10, it gives me two error messages:

Component  'MSCMCT2.OCX' or one of its dependencies not 
correctly registered: a file is missing or invalid.
Component 'COMDLG32.OCX' or one of its dependencies 
not correctly registered: a file is missing or invalid

So how do we make this legacy app run on Windows 10? I did some research on the internet and figured it out from this reference[1]. By going through all these steps, I sucessfully run this leacy app. I summarized these steps and wrapped into a short tip to save you time in the future for the same scenario.

Also, this tip is for me to save these reference links for future use.

Following reference [1], I installed and registered these two components. It works well and this legacy app fired up.

Background

These kinds of OCX components are ActiveX controls and are used in old/classic Visual Basic applications. They are responsible for functionalities which are the same as the common controls in Windows Form in .NET.

Download these OCX Components and Register Them

Step 1: Follow reference [2] to download Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update package.

Step 2: Then use 7-Zip to extract it into a local folder.

Step 3: Then copy MSCMCT2.OCX and COMDLG32.OCX into C:\Windows\SysWOW64.

Step 4: Run command prompt in Administrative Privilege.

Step 5: For Windows 64-bit systems: regsvr32 C:\Windows\SysWOW64\COMDLG32.OCX For Windows 32-bit systems: regsvr32 C:\Windows\System32\COMDLG32.OCX if this component is successfuly registered, we will see this message:

DllRegisterServer in comdlg32.ocx succeeded.

Points of Interest

I speculate that this legacy app is written in Visual Basic in 2002. without any reference manual, it still can run on Windows 10. isn't this amazing?

reasonably I expect it will still work on Windows 11 after these two OCX components are correctly registered.

I posted my question in Lounge and got one comment from Amarnath S for Dependency Walker. This tool is useful for complicated cases. For my small app, I only went through two steps and resolved the issues.

References

  1. COMDLG32.OCX Missing or Dependencies not Registered
  2. Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update
  3. Dependency Walker 2.2
  4. How do I extract files from an MSI package?

History

  • 6th May, 2022: Initialized this file

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Southmountain
Software Developer
United States United States
turns good thoughts into actions...


Comments and Discussions

 
QuestionAny OCX? Pin
Allegra Angelo24-May-22 21:10
MemberAllegra Angelo24-May-22 21:10 
AnswerRe: Any OCX? Pin
Southmountain26-May-22 16:44
MemberSouthmountain26-May-22 16:44 
GeneralMy vote of 5 Pin
Ștefan-Mihai MOGA18-May-22 20:06
professionalȘtefan-Mihai MOGA18-May-22 20:06 
GeneralRe: My vote of 5 Pin
Southmountain19-May-22 15:23
MemberSouthmountain19-May-22 15:23 
GeneralMessage Closed Pin
7-May-22 0:13
MemberSnehakruhi1 Ruhu7-May-22 0:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.