| Previous | Next |
| DXGI_ERROR_HW_PROTECTION_OUTOFMEMORY | DXGI_ERROR_NON_COMPOSITED_UI |
DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION
What Windows rejected: dynamic code policy violation
DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION, value 0x887A0031, is produced by dxgi error when the graphics component would require dynamic executable code that the process policy forbids. The investigation should stay attached to process mitigation policy during device creation and to the exact generation in which it was obtained.
Do not erase all shader caches or recreate every graphics object before preserving the first failing call. Cache, policy, remote-session and device-lifetime failures have different recovery rules.
Build a useful diagnostic record
| Capture item | Why it matters |
|---|---|
| What to capture | ProcessDynamicCodePolicy, device-creation flags, selected adapter, loaded user-mode driver modules and signing state |
| Current graph state | DXGI factory, adapter, device, resource or cache session |
| Supporting trace | DXGI debug messages, adapter LUID, driver version, device-removal reason where applicable and the exact API parameters |
| Object identity | process mitigation policy during device creation |
| Rejected condition | the graphics component would require dynamic executable code that the process policy forbids |
Separate state from capability
- Capture the failing state. Record ProcessDynamicCodePolicy, device-creation flags, selected adapter, loaded user-mode driver modules and signing state.
- Create the same device in a test process with and without the dynamic-code restriction.
The comparison with DXGI_ERROR_SDK_COMPONENT_MISSING is especially useful: DXGI_ERROR_SDK_COMPONENT_MISSING indicates an unavailable development component, not a mitigation conflict.
Verify the repaired path
Use a compatible signed graphics path or redesign the process boundary; do not silently weaken mitigation for the whole application.
- debug-layer, ETW or driver diagnostics no longer report the rejected process mitigation policy during device creation contract during the same scenario.
Implementation notes
Log DXGI debug messages, adapter LUID, driver version, device-removal reason where applicable and the exact API parameters.
Technical references
- Microsoft: DXGI error codes — background for the process mitigation policy during device creation.
- Microsoft: DXGI overview
- Microsoft: Direct3D 12 shader cache StoreValue
- Microsoft: Handle device-removed scenarios
Looking for a different code? Search another status or error code.