Site icon EfmSoft

What does Windows error code 1428 (ERROR_HOOK_NEEDS_HMOD) mean?

 
Previous Next
ERROR_INVALID_FILTER_PROC ERROR_GLOBAL_ONLY_HOOK

ERROR_HOOK_NEEDS_HMOD

The hook scope requires a module handle

For SetWindowsHookEx, callback placement depends on the target thread and process. If the hook is associated with all threads in a desktop or with a thread created by another process, the callback must be in a DLL and hmod identifies that DLL.

Using NULL for hmod is valid only for the documented same-process case where the hook procedure is in the current process code. Expanding a previously thread-local hook to global scope without changing packaging commonly exposes this error.

What to check

The callback itself may be valid; the failure is that USER32 cannot associate nonlocal hook code with the required containing module.

References


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

Exit mobile version