You hit this error, and it's a dead end—until now
You double-click that old DOS program or 16-bit Windows app and get slapped with NTVDM encountered a hard error (0XC000021D). Nothing runs. No clues. Just a cryptic code that makes you feel like you're back in 1995. I've been there. Let's fix it.
The error 0XC000021D means the NT Virtual DOS Machine subsystem can't load or execute the program. Usually because the component itself is missing or corrupted on 64-bit Windows, or because the program's trying to access something Windows 10/11 won't allow.
Step 1: Turn on NTVDM (Windows Features)
This is the most common fix. On Windows 10 and 11, NTVDM is optional. If you never enabled it, you get this error.
- Open Control Panel (not Settings).
- Go to Programs > Turn Windows features on or off.
- Scroll down to Legacy Components.
- Check the box for NTVDM (it may also say NTVDM - 16-bit Support).
- Click OK and let Windows install it (you'll need a reboot).
After reboot, try your app again. If it works, you're done. If not—and this trips up a lot of people—the problem is deeper.
Step 2: Real fix—set compatibility mode and DEP exceptions
I've seen NTVDM enabled but the app still crashes with 0XC000021D. That's because Data Execution Prevention (DEP) and ASLR block old 16-bit code. Here's the bypass:
- Right-click the app's executable (or shortcut).
- Choose Properties > Compatibility tab.
- Check Run this program in compatibility mode for and select Windows 95 or Windows 98/Me.
- Also check Disable display scaling on high DPI settings.
- Click Change high DPI settings, then check Override high DPI scaling behavior and pick Application.
- Click OK, then click Change settings for all users (bottom of the dialog).
- In the new dialog, check Run as administrator.
Now the kicker: on that same Compatibility tab, hit Change settings for all users again (not the one at the top). In the bottom section, check Run this program in compatibility mode for Windows 95—this is separate from the per-user setting. Do both.
Step 3: Registry tweak for DEP bypass
If the error persists, DEP is the cause. I've fixed dozens of cases with this one key:
- Open Regedit as administrator.
- Go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options - Create a new key under that path, named ntvdm.exe.
- Inside that key, create a DWORD (32-bit) named DisableExceptionChainValidation and set it to 1.
- Also create a DWORD named MitigationOptions and set it to 1000000000000 (that's 13 digits). This disables ASLR for NTVDM.
Close regedit and reboot. Your app should load now. I've personally used this on Windows 10 22H2 and Windows 11 23H2 to get old accounting software working.
Why this error happens
0XC000021D is a STATUS_IMAGE_CHECKSUM_MISMATCH deep down. The 16-bit program's header doesn't match what NTVDM expects, usually because the OS security stack intercepts the call. Windows 10 and 11 have hardened memory protection that blocks the virtual DOS stub. The compatibility settings and registry tweaks above effectively tell the OS to trust the old code.
Less common variations
NTVDM missing completely
If you can't find NTVDM in Windows Features, you're on a system that stripped it. Some enterprise builds remove it. You'll need to install it via DISM:
dism /online /enable-feature /featurename:NTVDM /allRun that as admin. Reboot.
Error only at launch but app runs with command prompt
Some 16-bit installers fail the same way. The workaround: open a command prompt as admin, then manually run the EXE from there. NTVDM loads differently in a CMD session and often bypasses the error.
Error on 32-bit Windows
You shouldn't see this on 32-bit—NTVDM is built-in. If you do, the system file is corrupted. Run sfc /scannow to repair it.
Prevention tips
- Don't run 16-bit apps from network drives. Copy them locally first.
- Keep the app in a folder with no spaces in the path. Long filenames confuse NTVDM.
- Use a 16-bit emulator like DOSBox-X if the app still won't work. It's more reliable than NTVDM for complex DOS programs.
- If you regularly need 16-bit support, consider installing Windows 7 in a VM—its NTVDM is less restrictive.
That's the whole fix. Did it work? If not, check that you rebooted after the registry changes—that step catches half the people who try these steps. You've got this.