Component COMCTL32.OCX or dependencies not registered: file missing or invalid

When you attempt to run a program created using Visual Basic (classic VB) on a Windows 11/10 computer, the following error may occur:

Run-time error '339':

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


comctl32.ocx error 339 missing

If COMCTL32.OCX is missing from the Windows\System32 or Windows\SysWOW64 directory, you’ll receive the following error when running the RegSvr32.exe command-line:

The module "C:\Windows\SysWOW64\comctl32.ocx" failed to load.

Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.

The specified module could not be found.

Let’s see how to fix this error on any version of Windows, including Windows 11.

Note: There are two versions of the Microsoft Windows Common Controls. Comctl32.ocx contains Windows Common Controls 5.0 and was included with Microsoft Visual Studio 5.0. Mscomctl.ocx contains Windows Common Controls 6.0 and was included with Visual Studio 6.0.

Resolution

To fix the COMCTL32.OCX error, download the module and save it to C:\Windows\System32 (for Windows 64-bit computers) or Windows\SysWOW64 folder (for Windows 32-bit computers).

Step 1: Download COMCTL32.OCX

The most recent version of COMCTL32.OCX is v6.01.9839. It’s included in VB60SP6-KB3096896-x86-ENU.msi (Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update 1/8/2016) package from Microsoft Corporation. Here’s the download link:

https://www.microsoft.com/en-us/download/details.aspx?id=50722
  1. Once downloaded, open the MSI package using the freeware 7-Zip utility.
    comctl32.ocx extract using 7-zip
  2. Extract/copy the module COMCTL32.OCX and save it to the Windows\System32 or Windows\SysWOW64 folder. On Windows 64-bit systems, copy the OCX file to: C:\Windows\SysWOW64. On Windows 32-bit systems, copy the OCX file to C:\Windows\System32. (Hint: How to Find the OS bitness.)
  3. Then register the module using RegSvr32.exe command-line as explained in “Step 2” of this article.

COMCTL32.OCX – File Information

Filename   : COMCTL32.OCX
Verified    : Signed
Publisher   : Microsoft Corporation
Company     : Microsoft Corporation
Description : Windows Common Controls ActiveX Control DLL
Product     : COMCTL
Prod version    : 6.01.9839
File version    : 6.01.9839
MachineType : 32-bit
MD5     : 2640ad05ab39321e6c9d3c71236ca0df
SHA1        : 03d30b572f312c2b554e76b3a18fbbb4a38a9be4
SHA256      : 634d27df20591de4d9b44dfb7f1ef03284c1d120f61b0801d668c1076d72cb6d

Note that the MSI package contains the following OCX files, among many other files inside the archive:

  • ComCt232.ocx
  • ComCt332.ocx
  • comctl32.ocx
  • ComDlg32.ocx
  • dbgrid32.ocx
  • dblist32.ocx
  • mci32.ocx
  • MSAdoDc.ocx
  • MSChrt20.ocx
  • mscomct2.ocx
  • mscomctl.ocx
  • MSComm32.ocx
  • MSDatGrd.ocx
  • MSDatLst.ocx
  • MSDatRep.ocx
  • MSFlxGrd.ocx
  • MShflxgd.ocx
  • MSINET.ocx
  • msmapi32.ocx
  • msmask32.ocx
  • msrdc20.ocx
  • MSWINSCK.ocx
  • PicClp32.ocx
  • richtx32.ocx
  • sysinfo.ocx
  • TabCtl32.ocx
  • wbclsdsr.ocx

Step 2: Register COMCTL32.OCX using RegSvr32.exe

Ensure you’ve copied the file COMCTL32.OCX to the correct folder:

If you’re using Windows 64-bit edition:

C:\Windows\SysWOW64

If you’re using Windows 32-bit edition:

C:\Windows\System32

If COMCTL32.OCX exists in the above location, then register the module using regsvr32.exe command.

To register the module, open an administrator Command Prompt window and type the following command:

For Windows 64-bit systems:



C:\Windows\SysWOW64\regsvr32  C:\Windows\SysWOW64\COMCTL32.OCX

For Windows 32-bit systems:

C:\Windows\System32\regsvr32  C:\Windows\System32\COMCTL32.OCX

You should see the following output/message:

DllRegisterServer in comctl32.ocx succeeded.

RegSvr32.exe throws the error 0x8002801c?

If the above command-line throws the error 0x8002801c, it means that the command was unable to write to the registry successfully. This happens if you run the command from a normal Command Prompt instead of the admin or elevated Command Prompt.

The module "comctl32.ocx" was loaded but the call to DllRegisterServer failed with error code 0x8002801c.

For more information about this problem, search online using the error code as a search term.

To resolve the error 0x8002801c, re-run the command-line from admin Command Prompt.


What is COMCTL32.OCX?

COMCTL32.OCX is a 32-bit module used by developers when creating applications using Visual Basic. COMCTL32.OCX module doesn’t ship with Windows, by default. Microsoft has informed that this module will be supported in Windows 11 (and earlier), but it has to be shipped along with the respective software. This means that the module won’t be available via WinBIndex.

For more information, see the section named “Supported runtime files to distribute with your application” in the article Support Statement for Visual Basic 6.0. Even now, there are lots of users who run their old VB apps on Windows 11/10.

I hope this article helped you resolve the COMCTL32.OCX error and run your classic VB apps successfully.

See also: Missing Comdlg32.ocx error while running an application?


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment