• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DLL debugging - why aren't my break points breaking?

CTho9305

Elite Member
MS VC 6... it's a modification to a keyboard hook. The code runs (kinda, I must have a bug somewhere), but the breakpoints are getting ignored. Any hints? I can provide the code if it would help.

There are 2 projects - an EXE and the DLL. I set the active project to the DLL and have it run the EXE.
 
I'm not familiar with DLL debugging but if it's anything similar to EXE debugging, usually either:

1) you're running without debug information (e.g. when running in Release mode); or
2) you "execute" (Ctrl+F5) rather than "debug" (F5) the program.


Hope that helps,
🙂atwl
 
Originally posted by: Adrian Tung
I'm not familiar with DLL debugging but if it's anything similar to EXE debugging, usually either:

1) you're running without debug information (e.g. when running in Release mode); or
2) you "execute" (Ctrl+F5) rather than "debug" (F5) the program.


Hope that helps,
🙂atwl

1. It's all compiled as debug
2. I use F5.
 
How are you using the hooks? Since they're in a DLL, I'm assuming this is a global keyboard hook that you're LoadLibrary()ing to get the HookProc when you SetHookEx()? Since you can't execute a DLL, what is your loader? Is it a console app, a simple windows app? If it's a Windows app, are you creating a new thread to process the hooks? If so, the breakpoints won't propogate to background threads, and that might be your problem.

If all else fails 😉
 
The code. MS VC 6 (should work in .NET). If you're using VC6, you need to have a somewhat recent (as in, past few years 😉) version of the windows core SDK (few dozen MB download from MS).

Warning: my part of the code is very ugly. It is also poorly written, but it is short enough that it should be easy to figure it out (CTho.h). As the original app is GPLed, I guess that makes this code also GPLed.
 
Back
Top