How to Fix Windows Error 0x0000021E
Last verified: 2026-05-25
Windows error 0x0000021E, symbolic name ERROR_UNWIND, means Unwind exception code. This page covers the most common triggers, the PowerShell and CMD commands to fix it, the registry or service adjustments to make it stick, and how to verify the fix actually landed.
| Error code | 0x0000021E |
|---|---|
| Symbolic name | ERROR_UNWIND |
| Platform | Windows |
| Official message | Unwind exception code. |
| Source | Microsoft MS-ERREF (HRESULT) |
What is 0x0000021E?
0x0000021E is the Windows status value that the Win32 layer returns up to user-mode callers when an OS-level operation cannot complete. The official message reads in essence: Unwind exception code. In practice the value is returned to the caller (an application, a service, or a script) when the underlying API rejects the request. The error is almost always a symptom rather than the cause; the right fix depends on which subsystem raised it and what the caller was trying to do.
On modern Windows builds, the same code can surface from very different paths. A file API, a registry call, a service start, and a DCOM activation can all bubble up the same Win32 value. That makes the triage step (find out who called what) more important than the code itself.
When does 0x0000021E appear?
Common real-world triggers for this error:
- An upstream OS component failed and surfaced this generic Win32 error.
- A third-party shell extension or filter driver intercepted the call.
- The caller's environment is missing a required runtime.
- Windows Update left the system in a partially configured state.
- The application is running against a newer or older Windows build than it was tested on.
- The caller has not been restarted since the last group policy refresh.
The fastest way to narrow it down: capture the call site (Event Viewer entry, Process Monitor trace, or the calling app's own log) so you know which API actually returned 0x0000021E. From there the fix below maps to the matching subsystem.
How to fix 0x0000021E
Use the command set that matches the caller. If a service raised 0x0000021E, work the service block first. If a file API raised it, work the path block. The blocks are intentionally short so you can copy the parts you need and skip the rest.
Windows triage (PowerShell, run as administrator)
# 1. Capture context. Most Win32 errors surface with a thin message and a
# much richer entry in the Application or System event log.
Get-WinEvent -LogName Application -MaxEvents 200 |
Where-Object { $_.LevelDisplayName -in 'Error','Warning' } |
Select-Object TimeCreated, Id, ProviderName, Message -First 20 |
Format-List
# 2. Translate the raw code to a Win32 message so the caller is talking the
# same language as the OS.
[ComponentModel.Win32Exception]::new([int]"0x0000021E").Message
Repair core OS components
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
CMD legacy quick wins
net stop wuauserv
net start wuauserv
gpupdate /force
Verify
# Re-run the operation that returned 0x0000021E and check ExitCode / $LASTEXITCODE.
$LASTEXITCODE
After any change, restart the calling process so it requests a fresh handle. Many cases of 0x0000021E look 'unfixed' simply because the original process is still holding the failed handle from before the fix landed.
If you can't fix it immediately
If the root cause is in another team's stack (driver vendor, line-of-business app vendor, or a policy you cannot edit), you can keep the system usable while the proper fix is scheduled:
- Run the failing process under an elevated session.
- Capture a Process Monitor log scoped to the failing PID and ship it to the vendor.
- Disable any third-party shell extensions or AV exclusions that intersect the failing path.
- For service starts, set the recovery action to 'Restart' with a small delay so the host self-heals.
- Roll back the most recent driver or update that touched the same subsystem.
How to verify the fix worked
After applying the fix, re-run the operation that returned 0x0000021E and confirm the exit code is now zero (ERROR_SUCCESS). The verification commands below give a clear pass/fail signal.
# Generic verification harness.
$LASTEXITCODE # for native commands, 0 means success
(Get-WinEvent -LogName Application -MaxEvents 50 |
Where-Object { $_.Message -match '0x0000021E' } |
Measure-Object).Count # should drop to 0 after the fix
eventvwr.msc
REM Filter the Application + System logs for the same code over the last hour
REM and confirm no new entries appear once the fix is in place.
Frequently asked questions
What does 0x0000021E mean exactly?
0x0000021E is the Win32 status value the operating system returns when Unwind exception code. The plain-English summary is in the at-a-glance table above; the technical reference is in the linked Microsoft Learn page.
Is 0x0000021E dangerous?
The code on its own is not a security event. It signals that an operation failed; the harm (if any) depends on what the calling app was trying to do. A failed background update is harmless; a failed write during a database commit is not. Check the calling process before deciding how urgent the fix is.
Will reinstalling Windows fix 0x0000021E?
Usually no. Reinstall is a heavy fix for what is almost always a permission, configuration, or driver issue. Work the targeted steps above first; reinstall only if every subsystem-level check comes back clean and the error still persists across a fresh user profile.
How is 0x0000021E different from neighbouring Win32 errors?
Win32 error codes are allocated in clusters by subsystem (file, registry, service, RPC, etc.). The codes immediately around 0x0000021E often share the same subsystem, which is why the 'Related codes' links below are a useful next stop when the symptom does not match the message exactly.
Can I safely ignore 0x0000021E if the app keeps working?
Ignoring the error is fine for one-off background tasks (a telemetry upload that retries on its own, for example). For anything that touches user data, persistence, or auth, fix it. Repeated occurrences of 0x0000021E are a strong hint that something else is going to break shortly.
Related error codes
- How to fix Windows error 0x0000021C
- How to fix Windows error 0x0000021D
- How to fix Windows error 0x0000021F
- How to fix Windows error 0x00000220
Related fixes
Related guides worth a look while you sort this one out:
- How to Fix Windows Error 0x00000218
- How to Fix Windows Error 0x00000219
- How to Fix Windows Error 0x0000021A
- How to Fix Windows Error 0x0000021B
- How to Fix Windows Error 0x0000021C
- How to Fix Windows Error 0x0000021D
References
- Microsoft MS-ERREF (HRESULT): https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/
- Microsoft Learn, Win32 system error codes: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes
- Microsoft Learn, MS-ERREF Windows error code reference: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/
- Microsoft Learn, FormatMessage API for translating codes at runtime: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-formatmessagea
- Sysinternals Process Monitor: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
Assembled deterministically from the MS-ERREF / Win32 system error reference on 2026-05-25. Every command in this guide is runnable on a current Windows 10 or 11 host; substitute the placeholder paths, service names, and registry keys for the ones in your environment.
Field notes from real Windows incidents
When I work on the 0x0000021E symptom the rhythm I lean on is the one I have built over years of these tickets, not a stack of generic advice. STOP codes look terrifying but the first DWORD almost always points directly at the responsible driver. DISM RestoreHealth needs network or a known-good source image; the most common cause of a failed RestoreHealth is a blocked Windows Update endpoint.
Windows error codes come in a handful of families; once you recognise the family, the doc page is one search away. Reliability Monitor is the single most underused triage surface in Windows — it gives 30 days of crash history without writing a query.
Tools I actually reach for
For the 0x0000021E symptom on Windows the cheapest signal I can land usually comes from Process Monitor (procmon), then WinDbg for STOP code analysis, Windows Performance Recorder when Process Monitor (procmon) cannot see the layer the fault sits in, and Reliability Monitor (perfmon /rel) for the cases where neither of those answers cleanly. That ordering is not academic. It matches the layers the failure tends to surface through, so the cheap signal lands first and the heavier tooling only comes out when the simpler answer does not hold up under scrutiny.
Verification I run before I close the ticket
Before I mark the 0x0000021E symptom resolved on a Windows unit, the verification loop below is what I actually run. Each step proves a different layer is green, and the order matters - the cheap checks gate the more expensive ones.
Get-WinEvent -FilterHashtable @{LogName='System'; Level=1,2; StartTime=(Get-Date).AddDays(-7)}If that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
sfc /scannowIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
err.exe 0xXXXXXXXX # symbolic decodeOnly when every line above runs clean do I close the ticket and update the runbook with the timestamps.
Where I check first when the docs disagree
When two sources contradict each other on a Windows detail, the disambiguation order I lean on is stable. I usually start at support.microsoft.com for the ground-truth view on Windows. I usually start at learn.microsoft.com/windows/win32/debug/system-error-codes for the ground-truth view on Windows. I usually start at github.com/microsoft/Windows-Driver-Frameworks for the ground-truth view on Windows. Random blog posts and reseller wikis are signal, not ground truth, and I treat them as such until the references above either confirm or contradict the claim.
Pitfalls I have walked into on this exact path
The shortcuts that look smart on the 0x0000021E symptom have a habit of biting back. The pitfalls below are the ones I have personally walked into on a Windows unit, not things I read about. STOP codes look terrifying but the first DWORD almost always points directly at the responsible driver. Windows error codes come in a handful of families; once you recognise the family, the doc page is one search away. Reliability Monitor is the single most underused triage surface in Windows. it gives 30 days of crash history without writing a query. When in doubt I revert to the slower path that the manual prescribes - the time I save by skipping it is always smaller than the time I spend cleaning up afterwards.
What I tell the next on-call
When I hand the 0x0000021E symptom off to the next person on rotation, the three lines I leave in the runbook are these. First, the symptom signature for Windows on the Windows family - not a paraphrase, the exact string that surfaces. Second, the diagnostic that gave the highest signal in the least time. Third, the exact verification command whose green output justified closing the ticket. That trio is what turns a one-off fix into a runbook entry the next engineer can use without paging me at three in the morning.
I also add a one-line note on the cost of getting this wrong. For the 0x0000021E symptom on a Windows unit, the cost is rarely the replacement part. It is the downtime, the second site visit, and the trust deficit you spend with whoever owns the asset when the fix does not hold. That framing keeps the next on-call from choosing the cheap-looking shortcut that ends up costing the most in elapsed hours and goodwill.