Michael Stefaniuc mstefani@redhat.de writes:
It seems that we don't have an implicit transformation of a HHOOK to a HANDLE16. Most of the internal HOOK_* functions are using HANDLE16's and the few functions that accepts as parameter a HHOOK are checking for the presence of the HOOK_MAGIC and are doing the conversion to a HANDLE16 with LOWORD(hhook).
Well yes, the hook functions are mostly using HANDLE16 internally, but it would be much better to change them to use HHOOK. There isn't much point in making HHOOK work with -DSTRICT if we don't use it anywhere.
- return CallNextHookEx16( WH_SHELL, code, wParam, lParam ); + return CallNextHookEx16( (HHOOK)MAKELONG(WH_SHELL, HOOK_MAGIC), code, + wParam, lParam );
WH_SHELL is not a valid hook handle, this code is broken (of course it was broken before too).