What does Windows error code 1411 (ERROR_CLASS_DOES_NOT_EXIST) mean?

 
Previous Next
ERROR_CLASS_ALREADY_EXISTS ERROR_CLASS_HAS_WINDOWS

ERROR_CLASS_DOES_NOT_EXIST

The registered window class cannot be found

Application window classes live in the registration scope described by USER32 and are identified by class name or class atom together with relevant module context. A typo is only one possible cause of this state.

A teardown race can unregister the class before a late cleanup or query path uses it. DLLs deserve special attention: classes registered by a DLL are not automatically unregistered merely because the DLL is unloaded, so lifecycle bugs can also leave stale assumptions in the opposite direction.

What to check

  • Verify the registration call succeeded and capture its class atom.
  • Use the same class-name encoding and spelling on every path.
  • Check the HINSTANCE supplied to class APIs.
  • Review initialization and shutdown ordering when worker threads can still create windows.

If CreateWindowEx fails to resolve the class during window creation, ERROR_CANNOT_FIND_WND_CLASS is the closely related creation-time condition.

References


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