Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPHookManager::OnWindowsHookProc
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPHookManager::OnWindowsHookProc

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: CXTPHookManager::OnWindowsHookProc
    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.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.313 seconds.