Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetWindowsHookEx

Status
Not open for further replies.

asm01asm

Programmer
Mar 21, 2004
3
CA
I have written a global windows hook DLL to callback to my dialog and tell me when the capslock key is toggled. When I first start it, it works. I am testing it by giving different windows focus. At some point my callback is not being called. What can cause the hook procedure to stop running?
 
We have this functin in a DLL. In DllMain for the cases:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
we were releasing the keyboard hook. I found that in XP embedded this case was getting hit about 10 minutes after starting up the process that loaded this DLL. This caused the hook to be released.

In Windows 2000 this case did not happen. Anybody know why any process, but my own, should be trying to detach from my DLL?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top