开发者

Please explain me what this writing actually means in examples?

开发者 https://www.devze.com 2023-04-01 06:40 出处:网络
If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx. If nCode is greater than or equal to zero, and the hook procedure did

If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx.

If nCode is greater than or equal to zero, and the hook procedure did not process the message, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_MOUSE hooks will not receive hook notifications开发者_JAVA技巧 and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the target window procedure.

I find it here and I am no good at English as well as this hooking stuff but I must do it as required. If you could explain me what it actually means with simple examples, I am really thankful. Please help me.... Thank you


In pseudocode it means approx this:

if (nCode < 0) return CallNextHookEx();
else if (nCode >= 0 && !MsgProcessed) return CallNextHookEx();
else
     return 1;
0

精彩评论

暂无评论...
验证码 换一张
取 消