| Previous | Next |
| STATUS_INVALID_CID | STATUS_INVALID_PARAMETER |
STATUS_TIMER_NOT_CANCELED
The timer and APC ownership did not match the calling thread
Timers that deliver APC routines carry thread-related ownership constraints. This status indicates that the cancellation or reset path is not executing in the thread context that originally established the APC association. It is not evidence that the timer was already canceled successfully.
Closing surrounding handles or freeing the APC context while the timer remains active can lead to later execution against invalid state. Timer setup, cancellation, and final rundown should be owned by one lifecycle object that can marshal cancellation back to the appropriate thread when required.
What to inspect
- Record the creating thread, canceling thread, timer object, APC routine, due time, and current signaled state.
- Determine whether the timer can still fire after the failed cancellation attempt.
- Keep APC context and target-thread references alive until cancellation or delivery is conclusively resolved.
- Avoid moving timer ownership between pool workers whose physical thread identity is not stable.
References
- Microsoft Open Specifications: NTSTATUS values
- Microsoft WDK: KeCancelTimer
- Microsoft: Asynchronous Procedure Calls
- Microsoft Windows SDK metadata: ntstatus.h
Looking for a different code? Search another status or error code.
