Processing confusion - EXE or DLL?

I've got an MFC dialog app and a keyboard hook, and am having problems. I've got the hook to install properlly and throw out a message box when I hit whatever key I determine (used for testing). I'm trying to keep the keystrokes stored in a string until the enter key is pressed, and decide if the string is a valid string, or to trap the enter keystroke.

Whenever I put a function call in the hook procedure to do some processing, trapping the enter key fails. Does this functionality need to be put in the application or the dll?
[559 byte] By [amg_developer] at [2007-11-19 6:02:47]