I have a keyboard global hook in dll and a dialog that uses that hook. Hook is inspecting input for a certain key combination and on detection does a SendMessage to my dialog box. Now, problem is that when dialog loses focus, hook doesn't work no more. I assume that DLL embedded in memory space of the process with focus has "new" stack which does not contain dialog's handler, obviously. So, the question is how to maintain my dialog's handle in DLL globally? I could dump it to a file, but that's just ugly. Maybe something like a "reversed atom", where I could use literal string to locate HINSTANCE value in any process space or something like that? Any ideas? Thank you!