Asked By David Ching
08-Sep-08 06:51 PM
LOL, no, it stands for "Computer based training". I think MFC uses this
hook to get notified of when a window is created so that it can, e.g. center
a modal window over its parent. (Yes, I was amazed it took something as low
level as a hook to perform this function.) But I don't see why this code
should fail in your case.
One thing is that hooks are sensitive to other apps that have installed the
same hook. In fact, you say the crash occurs when CallNextHookEx() is
running, and that is what causes the next app to have registered for the
hook notification to be called. So it might have something to do with
another app in your system that is misbehaving.
-- David