0XC00D0022

NS_E_INDUCED (0XC00D0022): Testing Error Fixes

This error shows up when Media Foundation or DirectShow code is in testing mode. You'll see it after installing debug tools or running sample apps. Here's how to shut it off.

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:

  1. Press Windows + R, type regedit, and hit Enter. You're going to the Registry Editor.
  2. Navigate to this key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Foundation
  3. Look for a DWORD value named FailAll. If it's there and set to 1, that's your culprit.
  4. Double-click FailAll and change the value from 1 to 0. Click OK.
  5. 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 named FailAll, InduceError, or TestError. Set them all to 0.
  6. 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:

  1. Open System Properties: Press Windows + X, choose System, then click Advanced system settings on the left.
  2. Click the Environment Variables button at the bottom.
  3. In both sections (User variables and System variables), look for MF_INDUCED_ERROR or MF_TEST_MODE. Select it and click Delete.
  4. 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.

Related Errors in Windows Errors
0X80284007 Fix TBS_E_INVALID_CONTEXT_PARAM 0x80284007 in Windows 0X000019E2 Fix ERROR_LOG_SPACE_RESERVED_INVALID (0X000019E2) 0X4000002F Fix STATUS_SYSTEM_POWERSTATE_TRANSITION (0X4000002F) 0XC00D004B NS_E_MAX_FILERATE (0XC00D004B) — Fix the file rate cap

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.