| Previous | Next |
| STATUS_CALLBACK_RETURNED_THREAD_PRIORITY | STATUS_CALLBACK_RETURNED_TRANSACTION |
STATUS_INVALID_THREAD
The supplied thread cannot be used for this operation
Some operations require a stable application-owned thread with a particular access mask or lifecycle. A closed handle, pseudo-handle used in the wrong process, stale thread ID conversion, or thread-pool worker passed to an API that forbids it can produce this status.
Thread-pool workers belong to the pool and may be retired or reused. Application code should not retain their handles for later affinity, suspension, context, or lifetime operations. Move persistent state to an application-owned thread or use callback and pool APIs that express the intended behavior.
What to inspect
- Record how the handle was obtained, duplicated, and granted access, plus the target process and thread IDs.
- Verify the thread still exists and that the handle has not been closed or recycled.
- Check whether the handle refers to the current transient pool worker.
- Replace long-lived worker-thread manipulation with documented thread-pool configuration where possible.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft: Thread Pool API
- Microsoft: pooled threads and callback environments
- Microsoft Windows SDK metadata: ntstatus.h
Looking for a different code? Search another status or error code.