| Previous | Next |
| ERROR_INVALID_CURSOR_HANDLE | ERROR_INVALID_HOOK_HANDLE |
ERROR_INVALID_ACCEL_HANDLE
The HACCEL does not identify an accelerator table
Accelerator tables map keystrokes to command identifiers and are consumed by the message-loop path through TranslateAccelerator. The handle is opaque and must originate from an accelerator-table creation or loading API.
A frequent failure pattern is a message loop that outlives the module or resource owner from which the accelerator table was loaded. Another is storing several GUI resource handles in an untyped integer slot and later using the wrong one. The command IDs inside the table are not themselves accelerator handles.
What to check
- Verify the return value of the table load/create call before entering the loop.
- Track module unloading and any explicit accelerator-table destruction.
- Log the
HACCELseparately from the targetHWNDand command IDs. - If translation simply does not produce a command, inspect the message loop and table entries after confirming the handle is valid.
This is not an invalid accelerator entry or command mapping; USER32 rejected the table handle itself.
References
- Microsoft: About Keyboard Accelerators
- Microsoft: Windows and Messages
- Wine: user32 API implementation inventory
Looking for a different code? Search another status or error code.