Print Page | Close Window

CXTPHookManager::OnWindowsHookProc

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=24327
Printed Date: 23 April 2024 at 2:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPHookManager::OnWindowsHookProc
Posted By: rdhd
Subject: CXTPHookManager::OnWindowsHookProc
Date Posted: 16 September 2022 at 11:40am
I have code that, depending on circumstances, calls ::SetWindowsKookEx with WH_CALLWNDPRCRET. We just noticed that it was failing to work when we use it.

With CJ 19.0, it works fine. With 19.3, it no longer works. I have traced this to using CJ shadows. I enable shadows in the version of our app that uses 19.0 and the version that uses 19.3.

I found CXTPHookManager::OnWindowsKookProc is used when a shadow is in use in 19.3. And, the code there appears wrong to me. I have always checked the input code and if >= 0, I do my processing. Then, regardless of the code, I always call ::CallNextHookEx.

I the CJ method, CJ only calls ::CallNextHookEx if the code < 0. This prevents my hook from ever being called.

Why isn't CJ calling the next hook in this case? I modified the CJ code to always call ::CallNextHookEx and it fixes my issue with 19.3. Is this an oversight or does CJ have some reason to avoid that.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net