The real reason you're seeing 0xC00D0022
Here's the thing about NS_E_INDUCED (0xC00D0022) — it's not a real error. Microsoft built this code into Media Foundation and DirectShow specifically for testing. When you see it, the system is saying "Hey, I'm in test mode and I'm deliberately throwing this error to simulate a failure."
This usually happens after you install the Windows SDK, Windows Driver Kit (WDK), or any Visual Studio workload that includes debugging tools for media components. Maybe you ran a sample project from Microsoft's GitHub, or you installed a video processing tool that shipped with debug binaries. The induced error flag gets set, and now every time your app tries to play a video or stream audio, it hits this wall.
The fix depends on what triggered it. Let's walk through the three most common causes, starting with the one that fixes 9 out of 10 cases.
Cause #1: The "FailAll" registry flag is set
This is the big one. Microsoft's Media Foundation has a debug registry key that, when enabled, forces every media operation to fail with the induced error. It's a tool for testing error handling in your app, but if you left it on, everything breaks.
Here's how to check and disable it:
- Press Windows + R, type
regedit, and hit Enter. You're going to the Registry Editor. - Navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Foundation - Look for a DWORD value named
FailAll. If it's there and set to 1, that's your culprit. - Double-click
FailAlland change the value from 1 to 0. Click OK. - If you don't see
FailAll, it might be inside a subkey. Check:
HKLM\SOFTWARE\Microsoft\Windows Media Foundation\Transcode
and
HKLM\SOFTWARE\Microsoft\Windows Media Foundation\SourceResolver
Look for any DWORD namedFailAll,InduceError, orTestError. Set them all to 0. - Close Registry Editor and restart your computer. After reboot, the error should be gone.
What to expect: If the registry key was the cause, your media apps should work normally again. You can test by opening Windows Media Player or any video file. No more 0xC00D0022.
Cause #2: You're running a debug build of a media application
If you compiled a project from the Windows SDK samples — like the "MFPlay" or "VideoThumbnail" samples — and you built it in Debug configuration, the induced error is baked right into the code. The SDK samples call MFCreateAttributes and set the MF_READWRITE_DISABLE_SCRUBBING attribute to deliberately trigger errors. That's the whole point of the sample: to show you how to handle failures.
But you don't want that in production.
The fix:
- Rebuild the project in Release mode instead of Debug. In Visual Studio, change the solution configuration from Debug to Release, then rebuild.
- If you can't rebuild, find the .exe or .dll and delete it. Then download the official release version from Microsoft or use the built-in Windows components.
- If you're running a third-party app that's stuck in debug mode, uninstall it and reinstall the release version from the developer's website.
What to expect: After switching to a release build, the induced error calls are removed. The app will behave normally.
Cause #3: Environment variable MF_INDUCED_ERROR or test hooks enabled
Less common, but I've seen developers set an environment variable that forces Media Foundation into test mode. The variable is MF_INDUCED_ERROR or sometimes MF_TEST_MODE. If it's set to 1, every Media Foundation call will fail with 0xC00D0022.
How to remove it:
- Open System Properties: Press Windows + X, choose System, then click Advanced system settings on the left.
- Click the Environment Variables button at the bottom.
- In both sections (User variables and System variables), look for
MF_INDUCED_ERRORorMF_TEST_MODE. Select it and click Delete. - Click OK on all dialogs, then restart your computer.
If you don't find those variables, check your startup scripts or batch files. Some dev tools auto-set these when you launch a debug console. Look in your cmd.exe startup or PowerShell profile.
What to expect: After removing the variable, the induced error stops immediately — no need to reinstall anything.
Quick reference table
| Cause | Diagnostic | Fix | Time to fix |
|---|---|---|---|
| Registry FailAll=1 | Check HKLM\...\Windows Media Foundation for FailAll | Set to 0 or delete the key | 5 minutes |
| Debug build of app | App was compiled from SDK samples or debug DLLs | Rebuild in Release or reinstall release version | 15 minutes |
| MF_INDUCED_ERROR env var | Check user/system environment variables | Delete the variable | 5 minutes |
One last thing: if you're a developer and you want this error to test your error handling, that's fine — just remember to turn it off before you ship. But for everyone else, this is a nuisance that has a simple fix. Start with the registry key. That's almost always the problem.