Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Redmond desk8 min

How to Fix Runtime Error 339 on Windows 10 and 11

Runtime Error 339 names a component-loading failure. Identify the exact OCX, obtain it from Microsoft or the application vendor, register it with the correct tool, and repair the application if dependencies or versions still do not match.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Runtime Error 339 means that an application cannot load a required ActiveX control, usually an .ocx file. The filename in the dialog—such as COMDLG32.OCX or MSCOMCTL.OCX—is the key to a safe fix. Obtain that exact component from Microsoft or the application’s vendor, register it from an elevated Command Prompt with the correct 32-bit tool for a legacy 32-bit control, and then repair or reinstall the application if the error remains.

What Runtime Error 339 means

The error is a component-loading failure, not a single universal “missing file” problem. Windows displays the number 339 when an application asks for an ActiveX control and cannot load it. The dialog normally identifies the control, for example:

As an Amazon Associate I earn from qualifying purchases.

  • COMDLG32.OCX
  • MSCOMCTL.OCX
  • Another application-specific .ocx file

Read the filename exactly, including its spelling and extension. Two different programs can show Runtime Error 339 while requiring different controls. Installing or registering a similarly named file will not solve the problem and can introduce a version mismatch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The wording “or one of its dependencies” is important. An OCX can be present and registered while a second library that it needs is missing, incompatible, or built for a different architecture. For that reason, a successful registration message is evidence that Windows accepted the registration command; it is not proof that the application has the correct version or a complete dependency chain.

#1 Best Overall
Sale
Microsoft Windows 11 (USB)
  • Less chaos, more calm. The refreshed design of Windows 11 enables you to do what you want effortlessly.
  • Biometric logins. Encrypted authentication. And, of course, advanced antivirus defenses. Everything you need, plus more, to protect you against the latest cyberthreats.
  • Make the most of your screen space with snap layouts, desktops, and seamless redocking.
  • Widgets makes staying up-to-date with the content you love and the news you care about, simple.
  • Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar. (1)

Capture the exact details before changing anything

  1. Copy the complete error text. Record the control filename exactly as shown. Do not rely on memory or a search result that mentions a different OCX.
  2. Note the application that fails. The application’s installer may be the authoritative source for the control, especially if the program uses a private or older build.
  3. Record whether Windows is 32-bit or 64-bit. Many controls used by Visual Basic 6 applications are 32-bit legacy components. On 64-bit Windows, the registration utility must match the control and the application.
  4. Do not delete an existing OCX yet. Replacing a file before identifying its source and version can make the original application harder to repair.

Choose a trustworthy component source

Microsoft Visual Basic 6.0 Common Controls update

For applications that specifically require the Visual Basic 6.0 common controls, Microsoft provides an official Common Controls package containing mscomctl.ocx and comctl32.ocx. Use the Microsoft package when the filename and the application’s documentation match those controls. An official installer is preferable to downloading an isolated file from an unfamiliar OCX site because it supplies the files as a known package rather than as an unverifiable copy.

The application’s own installer

If the failing program has a repair option or a current installer, use that route when possible. The vendor’s installer can place the expected OCX version alongside the application and install related dependencies together. This is particularly important when the error returns after registration or when the application was copied from another computer instead of installed normally.

Sources to avoid

Do not substitute a random OCX download, a file with a similar name, or a “registry fix” that promises to register every missing component. Such files may be the wrong version, may target a different architecture, or may omit dependencies. A registry cleaner cannot establish that the control belongs to your application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Remedy Source trust Component match Architecture handling Reversibility
Microsoft Visual Basic 6.0 Common Controls update Official Microsoft package Provides mscomctl.ocx and comctl32.ocx Still requires the registration tool appropriate for a 32-bit legacy control Can be followed by application repair or removal if needed
Application repair or reinstall The application’s vendor installer Targets the version expected by that application The installer may select the required files and architecture Supported repair or reinstall path
Manual registration of an existing, trusted file A file already supplied by Microsoft or the application vendor Uses the exact filename and path from the error Requires a matching 32-bit or 64-bit registration utility Registration can be undone with the corresponding unregister command
Random OCX download Unverified source Version and dependency chain are uncertain Architecture may not match Replacement can be difficult to diagnose or reverse

Manual fix: obtain and register the exact OCX

1. Get the component from the correct package

Use the official Microsoft Visual Basic 6.0 Common Controls update when it supplies the filename shown in your message. If the dialog names another control, obtain it from the application’s installer or its vendor’s support channel instead. Keep the package’s original filename and do not rename one OCX to imitate another.

2. Locate the real file

Registration commands operate on a specific file. Identify the full path where the trusted installer placed the OCX. It may be in the application’s installation directory or another location selected by the installer. Do not assume that copying a file into an arbitrary Windows system folder is the right solution.

3. Open an elevated Command Prompt

  1. Open the Windows Start menu and type Command Prompt.
  2. Choose Run as administrator.
  3. Approve the User Account Control prompt if Windows displays one.

Microsoft’s support procedure for COMDLG32.OCX requires an administrative prompt. A non-elevated window can fail even when the file itself is correct.

4. Run the registration sequence against the actual path

For the Microsoft example, run these commands in the elevated window:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Microsoft System Builder | Windоws 11 Home | Intended use for new systems | Install on a new PC | Branded by Microsoft
  • STREAMLINED & INTUITIVE UI, DVD FORMAT | Intelligent desktop | Personalize your experience for simpler efficiency | Powerful security built-in and enabled.
  • OEM IS TO BE INSTALLED ON A NEW PC with no prior version of Windows installed and cannot be transferred to another machine.
  • OEM DOES NOT PROVIDE SUPPORT | To acquire product with Microsoft support, obtain the full packaged “Retail” version.
  • PRODUCT SHIPS IN PLAIN ENVELOPE | Activation key is located under scratch-off area on label.
  • GENUINE WINDOWS SOFTWARE IS BRANDED BY MIRCOSOFT ONLY.
  1. regsvr32 /u Comdlg32.ocx
  2. regsvr32 /i Comdlg32.ocx

The commands must point to the real file. If the OCX is not in the current Command Prompt directory, use the full path, for example:

  1. regsvr32 /u "full-path-to-Comdlg32.ocx"
  2. regsvr32 /i "full-path-to-Comdlg32.ocx"

Replace Comdlg32.ocx with the exact filename from your dialog only when the application’s vendor or package instructions call for that control. For MSCOMCTL.OCX or another file, use that file’s actual path and follow the package’s registration instructions rather than blindly applying a command intended for a different component.

5. Match the registration utility to a legacy 32-bit control

Visual Basic 6 OCX files are legacy components. On 64-bit Windows, a 32-bit application normally needs the 32-bit version of the registration utility, while a 64-bit application needs the corresponding 64-bit tool. Use the utility and directory specified by the application or component vendor. Windows has separate registration tools, and their directory names do not by themselves tell you which one is correct for your program. Do not copy an OCX into an arbitrary System32 or SysWOW64 folder simply because a web page recommends it.

6. Test the application

Close the Command Prompt, launch the affected application, and reproduce the action that originally displayed Error 339. If it opens normally, the registration addressed the immediate loading failure. Keep the package and the original error text available in case another control is requested later.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What to do when registration does not solve Error 339

“The system cannot find the file”

The command is pointing to a filename or directory that does not exist. Recheck the spelling, extension, and full path. Locate the file installed by the trusted package, then run the command again with that exact path. Do not respond by downloading a similarly named OCX.

“The module failed to load” or a dependency-related message

This usually means that Windows could not load the OCX itself or one of its dependencies. Verify that the package matches the application, that the control’s architecture matches the registration utility, and that the application vendor’s installer supplied all related files. Registering the same incomplete or incompatible file repeatedly will not add a missing dependency.

An entry-point or procedure error appears

An entry-point-style message can indicate that the file version is not the one expected by the application. Undo the manual replacement if you made one, then use the application’s repair or reinstall process so its installer can restore the intended version. Retain the exact message for the vendor’s support team.

Access is denied

Close any Command Prompt that was opened without administrative rights and start a new one with Run as administrator. Also close the affected application before registering its control. If an organization manages the computer, its policy may prevent changes to protected locations; ask the administrator to perform the vendor-supported repair.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Registration reports success, but the application still shows 339

Registration success does not confirm that the version, dependency chain, or application installation is correct. Check that the dialog names the same OCX you registered, confirm the file came from the matching package, and verify that the 32-bit or 64-bit tool matches the program. If those checks pass, run the application’s repair option or reinstall it from its original vendor media.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Repair or reinstall the application

When the OCX is present but the error persists, use the application’s own maintenance path before replacing more Windows files. In Windows, open Settings, go to Apps, select the affected program, and use its available Repair, Modify, or Uninstall option. The exact labels vary by installer. If no repair option exists, reinstall from the vendor’s original installer and restart Windows if the installer requests it.

A repair or reinstall is the safer next step when the program was moved between computers, partially removed, updated from an old release, or installed without its supporting controls. It can restore the expected OCX version and other dependencies together instead of leaving a manually registered file that belongs to a different release.

If the application is business-critical, preserve the error text, the OCX filename, Windows edition, and whether registration succeeded before contacting the vendor. Those details distinguish a missing file from a version or dependency problem and prevent support from sending you an unrelated control.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows 10 and Windows 11 notes

The same diagnostic principle applies on Windows 10 and Windows 11: Error 339 identifies a component that the application cannot load, and the filename in the dialog determines the remedy. The operating system version does not turn every 339 message into a COMDLG32.OCX problem. Legacy 32-bit applications may continue to need 32-bit controls and the matching registration utility even when Windows itself is 64-bit.

Do not treat a successful command as a guarantee that an old application is fully compatible with a newer Windows release. If the application still fails after the correct component is installed and registered, the vendor’s repaired or updated installer is the appropriate escalation path.

Quick Recap

SaleBestseller No. 1
Microsoft Windows 11 (USB)
Microsoft Windows 11 (USB)
Make the most of your screen space with snap layouts, desktops, and seamless redocking.; FPP is boxed product that ships with USB for installation
$128.99
Bestseller No. 3

Common mistakes that make the problem worse

  • Registering the wrong filename: COMDLG32.OCX and MSCOMCTL.OCX are different controls; one cannot substitute for the other.
  • Using a random download: an unverified file may be incompatible or incomplete.
  • Ignoring architecture: a 32-bit legacy control may need the 32-bit registration utility on 64-bit Windows.
  • Running without elevation: Microsoft’s procedure uses an administrative Command Prompt.
  • Copying files into arbitrary system folders: location alone does not make a component correct, and it can obscure which version the application is loading.
  • Repeating registration after a dependency failure: registration cannot create a dependency that is absent or incompatible.
  • Skipping application repair: if the file is the wrong build, the application’s installer is usually the most reliable way to restore the expected component set.

Quick decision checklist

  1. Read the exact OCX filename in the Error 339 dialog.
  2. Match that filename to Microsoft’s Visual Basic 6.0 Common Controls update or the application vendor’s installer.
  3. Locate the file installed by that trusted source.
  4. Open Command Prompt with Run as administrator.
  5. Use the registration sequence and the actual file path.
  6. Use the 32-bit registration utility for a 32-bit legacy control on 64-bit Windows when the vendor specifies it.
  7. Retry the application.
  8. If the error remains, treat it as a version, dependency, architecture, or application-installation problem and run the vendor-supported repair or reinstall.

As an optional shortcut after these manual checks, Outbyte PC Repair can address more than 100 common Windows issues where possible, including broken system elements and shared DLL problems, and it includes an app-crash log; it runs on Windows 11, 10, 8 and 7 with a free trial by category of at least two days before a paid subscription. It complements antivirus software rather than replacing it, results vary, and no tool repairs every crash.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.