| Previous | Next |
| STATUS_CALLBACK_RETURNED_LDR_LOCK | STATUS_CALLBACK_RETURNED_PRI_BACK |
STATUS_CALLBACK_RETURNED_LANG
The callback leaked preferred-language state
Preferred UI languages can be configured per thread and influence resource lookup and message formatting. A thread-pool callback that changes them modifies the reusable worker. Later callbacks may load resources in the wrong language even though their own process or user settings are correct.
The safe pattern is to query or save the prior language configuration, apply the temporary setting only around the required operation, and restore it before every exit. Process-wide language changes should not be used as a substitute because they affect other threads concurrently.
What to inspect
- Log worker thread ID, entry and exit language lists, flags, and the resource lookup that required the change.
- Restore the previous setting in structured cleanup, including exception paths.
- Check libraries that change thread UI language implicitly during formatting or activation.
- Keep locale, UI language, and code-page settings distinct when comparing state.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft: SetThreadPreferredUILanguages
- Microsoft: pooled threads and callback environments
- Microsoft: Thread Pool API
Looking for a different code? Search another status or error code.