Hook Callback Procedure does not work with Notepad on Windows 11

Copper Contributor

As per the below code, the hook_Api procedure is never called when working with "Notepad" on Windows 11. It's no problem when I work with other applications.

 

g_hHook = SetWindowsHookEx(
WH_CALLWNDPROC,
(HOOKPROC)hook_Api,
g_hDll,
threadid);

 

Note: No problem when working with "Notepad" on Windows 10.
Please help me solve this problem.

 

Regards,

Trong Le

0 Replies