[Fix] COMDLG32.OCX Missing or Dependencies not Registered

The comdlg32.ocx module is used in old/classic Visual Basic applications. This ActiveX control is responsible for the functionality of common dialog boxes in your VB application. Common dialog boxes include the Open and Save As file dialog boxes; the Find and Replace editing dialog boxes; the Print, Print Setup, Page Setup printing dialog boxes, etc.

When you attempt to run a program created using Visual Basic 6.0 on a Windows 11/10 computer, one of the following errors may occur:

Failed to load control 'CommonDialog' from COMDLG32.OCX. Your version of COMDLG32.OCX may be outdated.
Run-time error '339':

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

comdlg32.ocx error 339 missing

This happens if the module comdlg32.dll is missing or corrupted. Let’s see how to fix the Common dialog error in your application when run on any version of Windows, including Windows 11.

Fix for Error COMDLG32.OCX missing or not registered

Register COMDLG32.OCX using RegSvr32.exe

First, check if the file COMDLG32.OCX exists in the following folder:

If you’re using Windows 64-bit edition:

C:\Windows\SysWOW64

If you’re using Windows 32-bit edition:

C:\Windows\System32

If COMDLG32.OCX exists in the above location, then all you need to do is 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:

regsvr32  C:\Windows\SysWOW64\COMDLG32.OCX

For Windows 32-bit systems:

regsvr32  C:\Windows\System32\COMDLG32.OCX

You should see the following output/message:

DllRegisterServer in comdlg32.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 "comdlg32.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.

COMDLG32.OCX Missing? Download it now

If COMDLG32.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\comdlg32.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.

In that case, you’ll need to download the module and save it to C:\Windows\System32 (for Windows 64-bit computers) or Windows\SysWOW64 folder (for Windows 32-bit computers).

Download COMDLG32.OCX

The most recent version of COMDLG32.OCX is v6.01.9841. 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.
  2. Extract/copy the module COMDLG32.OCX and save it to the Windows\System32 or Windows\SysWOW64 folder. On Windows 64-bit systems, extract the OCX file to: C:\Windows\SysWOW64. On Windows 32-bit systems, extract the OCX file to C:\Windows\System32.
  3. Then register the module using RegSvr32.exe command-line as explained at the top of this article.

COMDLG32.OCX – File Information

Filename	: COMDLG32.OCX
Verified	: Signed
Publisher	: Microsoft Corporation
Company		: Microsoft Corporation
Description	: CMDialog ActiveX Control DLL
Product		: CMDialog
Prod version	: 6.01.9841
File version	: 6.01.9841
MachineType	: 32-bit
MD5		: 9a4d0f97f0d84f877b388d4a12d90b6b
SHA1		: 0ed1fba0a1ebd514eaf2ed69171823144f662730
SHA256		: 2206e0f530032cb55e1fa00fdfb0c2d71d5b09b1f969089fb8f651fcd2489e6a

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

What is COMDLG32.OCX?

COMDLG32.OCX is a 32-bit module used by developers when creating applications using Visual Basic. This module is responsible for displaying the common file dialog (open/save as) in applications. COMDLG32.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 COMDLG32.OCX error and run your classic VB apps successfully.


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, my reader. 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