65.9K
CodeProject is changing. Read more.
Home

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

starIconstarIconstarIconstarIconstarIcon

5.00/5 (5 votes)

May 6, 2022

CPOL

2 min read

viewsIcon

15378

How to install and register .OCX components for legacy application

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