How to open a .dll file
Dynamic Link Library · Executable / library
A .dll file is compiled code that programs load, not something you open. If a program says a DLL is missing, install the runtime it belongs to. Never download an individual DLL from a website.
What a .dll file actually is
A DLL holds functions that several programs share, so the code exists once on disk instead of inside every application. Windows itself is built almost entirely out of them.
It is compiled machine code in the same Portable Executable format as an .exe, with the difference that it cannot start on its own. Something else has to load it.
Why it will not open
There is nothing to open, and that is the honest answer. People arrive here for one of two reasons: a program reported a missing DLL, or they want to inspect what is inside one.
Look up the exact file your error names
Renaming it to an extension you can open will not help: changing the extension does not convert the file, it only changes what Windows tries to open it with.
Step by step
Windows
- 01If a program reports a missing DLL, identify the runtime it belongs to rather than hunting for the file. VCRUNTIME140 and MSVCP140 come from the Visual C++ Redistributable; d3dx9 files come from the DirectX End-User Runtime; MSVCR100 comes from the 2010 redistributable.
- 02Install that official runtime. The DLL arrives with it, in the right place, correctly registered.
- 03To inspect a DLL, open it in a resource viewer or a disassembler. To see just its icons and strings, a resource editor is enough.
- 04To see raw bytes, HxD opens it as a hex dump.
- 05To edit one, be clear about which kind of edit you mean. Changing an icon, a piece of text or a dialog is a resource edit and a resource editor does it without touching a single instruction. Changing what the code does is patching, needs a disassembler, and is a different job entirely.
- 06To run one: you cannot, not directly. rundll32.exe file.dll,FunctionName exists, but it only works when the DLL exports a function written specifically for rundll32, which almost none do. If a set of instructions told you to run a DLL this way and it failed, the instructions were wrong, not your machine.
- 07Windows looks for a DLL in the program’s own folder first and in the system directories after that, which is why a file dropped next to the .exe takes effect and the same file dropped anywhere else does nothing.
macOS
- 01DLLs are Windows-specific. macOS uses .dylib for the same job.
- 02A Windows DLL cannot be loaded on macOS other than inside Wine or a virtual machine.
What usually goes wrong
DLL download sites are a malware channel
Searching for a missing DLL by name leads straight to sites offering that single file. This is one of the oldest and most effective malware delivery methods there is. There is no legitimate reason to obtain a system DLL that way: install the runtime package it belongs to instead.
Registering a DLL rarely fixes anything
Advice to run regsvr32 is copied endlessly and applies only to COM components. For a missing runtime DLL it does nothing, because the problem is that the file is not there, not that it is unregistered.
Editing a DLL that Windows ships will not stick
System DLLs are covered by Windows Resource Protection, so a modified copy gets restored, and sfc /scannow puts it back on purpose. Signed application DLLs are worse: changing a byte invalidates the signature, and software that checks its own files will refuse to start rather than run a modified one. Resource edits on your own programs are fine. Edits on anything Windows owns are a detour.
Copying DLLs into System32 is how one broken program becomes a broken Windows
It is the advice you find everywhere and it is the wrong end of the problem. Overwriting a system DLL with a version from somewhere else affects every program on the machine, not just the one that complained, and the damage shows up later in something unrelated. If a program needs a DLL, the runtime installer puts it where it belongs.
An online DLL viewer means uploading an executable to a stranger
The searches for one are real, and so is the catch: a DLL is compiled code, and if you are looking at it because you suspect it, sending it to an unknown site is the wrong move. A local hex editor or resource viewer tells you the same things without handing the file to anybody.
Programs that open .dll
Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer. Once you have downloaded it, you can check the file against our index before you run it.
If you end up downloading one of these from somewhere other than the publisher, what you can and cannot verify about that is worth two minutes.
Common questions
- A program says a .dll is missing. What do I do?
- Install the runtime package that DLL belongs to, not the file itself. VCRUNTIME140 and MSVCP140 come from the Visual C++ Redistributable, d3dx9 files from the DirectX End-User Runtime. Downloading a lone DLL from a website is a well-known malware vector.
- Can I open a DLL to see what is inside?
- You can inspect one with a resource viewer or disassembler, and view its raw bytes in a hex editor such as HxD. You cannot run it directly, because a DLL has no entry point of its own.
- How do I edit a DLL file?
- It depends which edit you mean. Icons, text and dialogs live in the resource section and a resource editor changes them without touching code. Changing behaviour means patching compiled instructions in a disassembler. Either way, editing a DLL that Windows ships does not stick: Windows Resource Protection restores it, and modifying a signed DLL breaks the signature so the program may refuse to load it.
- How do I run a DLL file?
- You do not run a DLL the way you run an .exe, because it has no entry point of its own. rundll32.exe file.dll,FunctionName works only for DLLs that export a function written for rundll32, which very few do. If instructions told you to run a DLL and nothing happened, the instructions were wrong.
- How do I open a .dll file on Windows 11?
- Exactly as on Windows 10, and that is the whole answer: nothing changed. A DLL is compiled code rather than a document, so there is no built-in viewer in any version of Windows. Use a hex editor or a resource viewer to inspect one, and if a program reported a missing DLL, install the runtime it belongs to instead.
- Where should DLL files go?
- Wherever the installer that owns them puts them, which is usually the program’s own folder. Windows searches that folder before the system directories, so a DLL placed next to the .exe is found and the same file placed elsewhere is not. Copying DLLs into System32 by hand affects every program on the machine and is a common way to break more than you fix.
- Can I delete DLL files?
- Not from the Windows system folders, where deleting one breaks whatever was using it, often something you were not thinking about. DLLs sitting in a program’s own folder belong to that program and go away when you uninstall it, which is the safe way to remove them.