What does Windows error code 1813 (ERROR_RESOURCE_TYPE_NOT_FOUND) mean?

 
Previous Next
ERROR_RESOURCE_DATA_NOT_FOUND ERROR_RESOURCE_NAME_NOT_FOUND

ERROR_RESOURCE_TYPE_NOT_FOUND

The requested resource type is absent from the image.

ERROR_RESOURCE_TYPE_NOT_FOUND is Win32 error 1813 (0x715). PE resources are organized first by type, then by name or numeric identifier, and then by language. The image contains resource data, but its top-level tree has no matching type such as RT_DIALOG, RT_STRING, RT_VERSION, or the application’s custom type.

Common type mismatches

  • the caller uses a numeric standard type while the resource was compiled under a string type, or the reverse
  • the expected resource was moved to a satellite or resource-only DLL
  • a build configuration omits one resource script or conditional resource block
  • a custom type string differs in spelling, case assumptions, or encoding at the API boundary
  • the loader selected another version of the module whose resource schema is different

Lookup details to capture

Record the module’s final path and hash, requested type exactly as passed, whether it is integer or string, requested name and language, product build, calling feature, and all resource types enumerated from the actual image. Preserve integer-resource semantics such as MAKEINTRESOURCE; converting every identifier to display text can hide the mismatch.

How to diagnose the tree

Enumerate resource types in the selected module and compare them with the caller’s contract. If the intended type is absent, inspect the compiled resource script and linker inputs for that build. If a similar string type exists, verify that both producer and consumer use the same exact representation.

Check language packs and plug-in deployment, but do not start with language fallback: type lookup fails before name and language selection. Confirm that the module handle is not NULL when the resource belongs to a DLL rather than the executable.

Corrective action

Compile and package the missing resource type or change the caller to the type actually defined by the documented resource contract. Keep custom type names in a shared header or schema and add a build-time resource inventory test.

When an optional feature legitimately lacks that type, disable the feature gracefully and log the inventory once. Repeated calls with alternate resource names cannot succeed until the type level matches.

Difference from a missing resource name

ERROR_RESOURCE_NAME_NOT_FOUND means the type exists but the requested item under that type does not. Error 1813 stops one level earlier: no matching type node exists in the resource directory.

Example

A plug-in stores JSON defaults under custom type CONFIG, but a refactor requests RT_RCDATA. The DLL has a valid resource section and the item name is correct, yet lookup returns 1813. Restoring the shared custom type fixes the call; changing language IDs would not.

References


Looking for a different code? Search another status or error code.