Hello all. I'm writing a Push To Talk radio program. As such I have a DLL that uses SetWindowsHookEx to set a callback function. This works, and is called when keyboard events take place.
Client programs using this DLL wish to know when a keyboard event takes place (even if said client program is not in the foreground).
So in my DLL I store a function pointer in a shared data section), and the DLL allows the clients to pass in a function pointer to be called when a keyboard event is raised.
If the client program has focus, the callback works as expected. If the client does not have focus, the callback method is called but never returns. I suspect this is because the client's function is in a different address space then all the DLL instances except the one it explicitly creates.
So my question is, how do you send data from a DLL to a client which may not have focus? Is a pipe the best bet?