IMDTouchKnowledge BaseShop main store

Troubleshooting

Windows error 126 on an HMI startup: missing DLL dependency fix

HMI and touchscreens Published 7 min read By IMDTouch engineering team

Short answer

Windows error 126 means the loader could not find a module the HMI asked for, or one of that module's own dependencies. Copying individual DLL files cannot fix a dependency chain. Record the dialogs in order, identify the first failed load against the documented Windows DLL search order, then repair the software package that owns that module, from its own installer.

Compact black operator display showing start and stop buttons, a speed setpoint and a part count
On this page
  1. What error 126 means at startup
  2. Record the dialogs in order, then find the first failure
  3. Where the Windows loader looks for a DLL
  4. Worked example: iFIX 4.0 build 6192 on a Windows XP Embedded panel
  5. Repair the dependency chain without mixing files
  6. When the repair is not worth it
  7. Questions asked

Windows error 126 is the loader's module-not-found code: the HMI runtime asked Windows to load a DLL, Windows searched every folder its documented search order covers, and neither that file nor one of the file's own dependencies was found. That is also why copying the named DLL by hand changes nothing. One file is one link in a chain, and the chain is what failed. The fix is to record every message in the order it appears, identify the first failed load, and repair the software package that owns that module, from that package's own installer or media. No PLC address, port or timeout setting is involved: the runtime stops before it opens a single connection to the controller.

What error 126 means at startup #

The dialog states it plainly: LoadLibrary failed with error 126, The module could not be found. Two different gaps return the same code. The DLL named in the dialog may be absent from the installation, or the DLL may exist while one of its own dependencies does not, and the loader reports the outer request either way. Both are failures inside the panel's Windows image rather than on the network: the runtime stops before any tag is read, so no PLC address, port number or timeout setting can be the cause or the cure.

Record the dialogs in order, then find the first failure #

When several DLL dialogs appear at startup, as in this case, they are a sequence of consequences, not independent faults. The loader stops at the first module load it cannot resolve; each later dialog reports a secondary effect of that stop. Fixing dialog by dialog multiplies changes without touching the original failure, so capture the text and the order first, and treat the first message as the fault.

What you see What it means The next move
The named DLL is nowhere on the panel The file the runtime requested is missing from the installation Identify the package that installs that file and repair that package
The named DLL exists but startup still fails One of that DLL's own dependencies is missing or unreachable Inspect the DLL's dependency list and trace the first unresolved load
Several dialogs fire one after another An early shared dependency failed and blocked everything after it Work on the first message only; retest before touching anything else
Hand-downloaded files changed nothing File presence alone does not complete a dependency chain Inventory every added file, set it aside, and repair the owning package

Where the Windows loader looks for a DLL #

When a program asks for a module without giving a full path, Windows resolves the request through a documented search order:

  1. the folder the application executable was loaded from
  2. the system directory
  3. the 16-bit system directory
  4. the Windows directory
  5. the current directory
  6. the folders listed in the PATH environment variable

On Windows XP SP2 and later the safe form of this order is the default, and it is what a normal XP-era image uses. With the safe order disabled, the current directory moves up to just behind the application folder, which makes a stray copy in it more likely to shadow the real file. A program can bypass all six entries by loading a module through a full path, but the internal loads an HMI runtime makes at startup use the search order above. Two consequences decide this repair: a file placed in a folder outside the list is unreachable no matter how correct its name, and a wrong-version copy sitting inside a listed folder can load instead of the real one.

Worked example: iFIX 4.0 build 6192 on a Windows XP Embedded panel #

Inputs. The case in front of us, read from its own screens: an iFIX runtime reporting version 4.0, build 6192 on its startup display, running on Windows XP for embedded systems on a 15-inch all-in-one panel. The startup dialogs reported error code 126 and more than one DLL failure. Missing DLL files had already been downloaded and copied onto the panel, and startup still failed. The Windows image on the panel cannot be rebuilt, so the repair has to arrive as packages.

Rule. Windows loads each startup module through LoadLibrary, and when that module or any dependency behind it is missing from every folder in the search order, LoadLibrary returns the module-not-found code and startup stops at that load. The first dialog names the first failure; every dialog after it is a consequence of that stop.

Arithmetic. The same code reaches logs and debuggers in hexadecimal. 126 in hexadecimal is 0x7E: 7 × 16 = 112, the hexadecimal digit E carries 14, and 112 + 14 = 126. A log entry that shows 0x7E is the same module-not-found failure as the dialog on the panel.

Result. The owner of the first named module decides the repair. If dependency inspection shows that module belongs to a prerequisite — a Microsoft redistributable, a driver package, a graphics runtime — the repair is that prerequisite's own installer. If the module belongs to the HMI product itself, the repair is the product's repair or modify option, run from media matching release 4.0, build 6192. The hand-copied files stay off the panel until the repair is proven, because any copy sitting in a searched folder can shadow the real file.

Decision. Repair the package that owns the first unresolved module, from its own installer, and change one thing per retest. Because the Windows image cannot be rebuilt, the only other legitimate repair source for damaged image content is the panel supplier's approved recovery procedure. If neither source can produce the missing module, stop repairing and replace the terminal, as the last section below covers.

Repair the dependency chain without mixing files #

Do the repair at a planned stop with the process in a safe state, and make a backup or image of the panel first — one you have actually restored in a test — because a half-repaired runtime that will not start is harder to walk back than a scheduled outage.

  1. Capture the record: the exact Windows edition and service pack, the panel identification, the HMI release and build from the startup screen, and every dialog in displayed order.
  2. Inventory the hand-added files: name, date, size and folder for every downloaded DLL, and move the copies off the panel before the repair so they cannot shadow the real files during the retest.
  3. Repair the owning prerequisite first with its own installer, obtained through the software vendor's documented channels; the first unresolved module's owner decides which installer that is.
  4. Run the HMI product's repair or modify option from media matching the installed release, which restores the files, component registration and configuration entries that a manual file copy never reproduces.
  5. Apply only maintenance packages documented for that exact release and OS, and follow the installer's restart instructions.
  6. Retest with the same startup test and compare against the recorded first failure: if the sequence shortens, keep going one change at a time; if a different module now fails first, record it as new data rather than chasing two faults in parallel.
  7. Do not register DLL files wholesale: registration applies only to self-registering components, it cannot create a file that is absent, and blanket registration adds one more unknown to the image.

When the repair is not worth it #

This panel runs a Windows image that is out of support and cannot be rebuilt, so the owner test has an endpoint: the first unresolved module's owner cannot be identified, the matching media cannot be obtained from the software vendor or its distributors, or dependency tracing shows damage spread across several prerequisites at once. At that endpoint, replace the terminal — current industrial panel PCs run a supported Windows image and carry the same kind of HMI runtime forward.

Before moving the runtime, work through the checks in Windows Embedded panel PC software compatibility checks, because that is exactly the move those checks were written for. A startup failure that shows no DLL dialogs at all sits at a different stage of boot; fixing startup splash screen errors on legacy panel PCs covers that stage instead.

Dependency failures of this class reach beyond HMI software, too. LabVIEW projects meet the same problem when package dependencies go unmet, and configuring OpenG package dependencies in LabVIEW projects walks through that resolution on the LabVIEW side.

Questions asked

Why did copying the downloaded DLL files not fix the startup?

A single file is not the chain. The loader checks up to six folders per request, and a hand-copied file lands in just one of them; if that copy needs a module of its own, or the copy is the wrong version or the wrong bitness, the same failure returns. A 32-bit process on Windows XP for embedded systems cannot load a 64-bit DLL at all, so both the source and the architecture of any copied file have to match the installation.

Will a system file checker scan restore the missing HMI files?

Only files that Windows itself owns. Running the scan once is still worthwhile, because damage to a Windows component is one possible cause of a module-not-found failure and the scan rules it out in a single pass. It will never restore files that belong to the HMI product or its third-party prerequisites; those return only through their own installers or the product's documented repair option.

What does the graphics driver have to do with this failure?

Some module-not-found failures trace to the display driver stack: the startup asks for a graphics runtime module and the installed driver owns it. Updating the graphics driver through the panel supplier's documented channels is a recognized first check for this kind of LoadLibrary failure, so read the module name in the first dialog before planning a reinstall. If it names a display component, repair the driver first.

Where may a genuinely missing DLL file come from?

From the software that installs it: the product's own media, the vendor's documented download area, or an official prerequisite installer, matched to the installed release. Never take DLL files from third-party file-sharing sites. Those binaries are unverified, they may be the wrong build for the installation, and putting unknown code on a machine that runs a process turns a software fault into a plant risk.

What should be recorded before asking the software vendor for help?

The exact Windows edition and service pack, the panel identification, the HMI product version and build from its startup screen, every error dialog captured in displayed order with the module names, the inventory of hand-added files with dates and folders, and the dependency inspection result naming the first unresolved module. Vendors reproduce the failure from that first-failure record; a photograph of the last dialog alone points the diagnosis the wrong way.

Keep reading

  • Troubleshooting

    Fix the libQt5WebEngine.so.5 error when an HMI editor will not start

    The message means the dynamic loader cannot resolve one shared library the editor binary needs, so startup fails before any editor code runs. Run a dependency report on the exact failing binary, install your distribution's Qt 5 WebEngine runtime package that provides libQt5WebEngine.so.5, and relaunch only when the report shows no unresolved libraries. Do not symlink or rename another library to match the name.

    HMI and touchscreens

  • How-to

    Selecting a WinCC Unified PC Target in TIA Portal

    An IPC can host WinCC Unified as a PC-based HMI. If the SIMATIC HMI application list shows only WinCC RT Advanced, your TIA Portal installation is missing the Unified PC engineering option: add a PC station, add the SIMATIC WinCC Unified PC application, then match the runtime version and license on the target computer. The hardware is not the deciding check.

    HMI and touchscreens

  • Troubleshooting

    Why WinCC license keys disappear on an embedded IPC

    A WinCC key is a small hidden, location-bound object at the root of the licensed volume, so power loss, write filters, bad sectors, defragmentation, image restores and cleanup tools destroy or hide it with the volume. Rank the causes by what the Automation License Manager reports — missing, defective or expired — and fix the storage cause instead of re-transferring the key.

    HMI and touchscreens

Fix WebIQ Designer Stuck Loading an HMI Project ZIP