A Dynamic Link Library is a file your programs share to avoid duplicating the same code

A Dynamic Link Library, or DLL, is a file that contains code and data that multiple programs can use at the same time. Instead of each program storing its own copy of common functions — like how to display a button or save a file — they all point to the same DLL file. This saves disk space and makes updates simpler: when Microsoft fixes a security problem in a shared DLL, every program using it gets the fix without needing its own separate update.

The word "dynamic" means the connection happens while your program is running, not when you install it. When you open a program, it looks for the DLLs it needs, loads them into memory, and uses them. If the DLL is missing or broken, the program will not start or will crash partway through.

DLLs are a Windows-specific thing. Mac programs use something called frameworks, and Linux programs use shared libraries — the concept is the same, but the file format and how they work is different.

Key Takeaways

  • A DLL is a shared file that multiple programs use to perform common tasks, rather than each program storing its own copy of the same code.
  • When a program starts, it searches for the DLLs it needs and loads them into memory — if a DLL is missing, the program will not run.
  • DLLs are updated separately from the programs that use them, so a single security fix can protect dozens of programs at once.
  • A corrupted or outdated DLL can cause crashes or error messages that mention the DLL file name, which tells you what went wrong.

Why programs depend on DLLs instead of carrying their own code

Imagine if every program on your computer had to include its own code for displaying windows, handling mouse clicks, and connecting to the internet. Your hard drive would fill up fast, and your computer would run slower because the same code would be loaded into memory dozens of times. DLLs solve this by letting programs share the heavy lifting.

Microsoft provides DLLs for common tasks — graphics, sound, networking, security — so programmers do not have to write that code from scratch. A game developer can focus on the game itself and rely on a DLL to handle the graphics. A banking app can rely on a DLL for encryption. This also means that when Microsoft discovers a security hole in one of those shared DLLs, fixing it once protects every program that uses it.

The downside is that if a DLL goes missing or gets corrupted, every program that depends on it breaks. This is why you sometimes see error messages that mention a DLL file name — the program is telling you which shared file it could not find.

What happens when a DLL is missing or outdated

When you try to open a program and it cannot find a DLL it needs, you will usually see an error message with the DLL file name in it. Common ones include msvcp140.dll, vcruntime140.dll, or d3dx9_43.dll. The message might say "DLL not found" or "The program cannot start because [filename] is missing from your computer."

This happens for a few reasons. Sometimes you uninstall a program and it removes a DLL that another program also needs. Sometimes Windows updates break a DLL or move it. Sometimes malware deletes or corrupts DLLs. Sometimes you read a program that needs an older version of a DLL than what you have installed.

An outdated DLL can cause crashes even if the file exists. If a program expects a newer version of a DLL than what is on your computer, it may not work correctly. This is why Windows Update exists — it keeps DLLs current so programs do not break.

How to fix a missing or broken DLL

The fastest fix is usually to reinstall the program that is complaining about the missing DLL. When you reinstall, the program will restore its DLLs or read the ones it needs. Close the program completely, uninstall it through Settings > Apps > Apps and Features, restart your computer, then read and install it again from the official source.

If reinstalling does not work, run Windows Update to make sure your system DLLs are current. Go to Settings > Update & Security > Windows Update and click "Check for updates." Restart your computer when prompted. Many DLL errors disappear after this step because Windows has restored or updated the shared files.

Do not read DLL files from random websites. These sites often bundle malware with the DLL, and you cannot verify that the file is legitimate. If a website offers to fix your DLL problems by downloading a file, close it and use one of the methods above instead.

The difference between system DLLs and program-specific DLLs

System DLLs are provided by Windows and sit in a protected folder that most programs can access. These handle core tasks like graphics, sound, and networking. Examples include kernel32.dll (core Windows functions), user32.dll (window and button display), and gdi32.dll (graphics). Windows Update keeps these current, and you should not manually delete or replace them.

Program-specific DLLs are installed alongside a program and only that program uses them. When you uninstall the program, these DLLs are usually removed. Some programs install their own versions of common DLLs in their own folder so they do not conflict with other programs' versions.

This separation exists because different programs sometimes need different versions of the same DLL. A game from 2010 might need an older version of a graphics DLL than a game from 2023. By letting programs keep their own copies in their own folders, both can run without fighting over which version should be installed.

Why you see DLL errors in games more often than other programs

Games depend on graphics DLLs more heavily than most programs, and graphics technology changes fast. A game might need a specific version of d3dx9.dll (an older graphics library) or vcruntime140.dll (a runtime library that handles common functions). If your computer does not have that exact version, the game will not start.

This is also why game developers often include a "redistributable" installer with their game — a small program that installs the DLLs the game needs. If you see an error when launching a game, look in the game folder for a file named something like "Visual C++ Redistributable" or "DirectX Setup" and run it. This installs the DLLs the game expects to find.

Older games are especially prone to DLL errors on modern Windows because the DLLs they need are no longer installed by default. Windows 10 and 11 removed some older graphics libraries to save space. If you want to play a game from 2005, you may need to manually install those old DLLs or run the game in compatibility mode.

Frequently Asked Questions

Can I delete a DLL file to free up space?

No. Do not delete DLL files manually. If a DLL is on your computer, something needs it. Deleting it will break that program or your entire system. If you want to free up space, uninstall programs you do not use through Settings > Apps > Apps and Features, and Windows will remove their DLLs safely.

What does it mean when an error message says "DLL injection"?

DLL injection is a technique where malware forces a program to load a malicious DLL. If you see this term in an antivirus warning, it means malware tried to hijack a program. Run a full antivirus scan and restart your computer in Safe Mode if the infection persists.

Why do some programs ask me to install Visual C++ Redistributable?

Visual C++ Redistributable is a package of DLLs that programs written in C++ need to run. Many games and professional software require it. Installing it is safe — it just adds shared libraries that multiple programs can use. You can have multiple versions installed at once without conflict.

Is it safe to update a DLL through Windows Update?

Yes. Windows Update only updates system DLLs that Microsoft controls and has tested. These updates fix security holes and compatibility problems. Never skip Windows Update because you are worried about DLL changes — the risk of staying outdated is much higher than the risk of updating.

Can I move a DLL file to a different folder?

Not safely. Programs expect DLLs to be in specific locations — either in the Windows system folder or in the program's own folder. Moving a DLL breaks the connection between the program and the file it needs. If you need to organize files, uninstall and reinstall the program instead of moving its DLLs.