Click to See Complete Forum and Search --> : send message to exe from dll


phreeezsix
March 13th, 2003, 08:52 PM
Hi, I have a dll that I am using to listen for keyboard events system-wide, however, I want to send a message back to the exe that called the dll in certain cases. i don't really know what i'm doing, so i have no idea what kind of function i would use. i'm looking for something like "PostMessage(WM_THISKEYWASPRESSED)" that would also take some kind of paramter to know to send that message back to the calling exe. is this possible? if so, what function do i need to use? i would appreciate a short code snippet if possible. thank you!

Tom

wuyh
March 14th, 2003, 01:26 AM
first, i think this program should based on threaded model. So, ::PostMessage(hwnd,WM_, PARA,PARA), or PostThreadMessage(..), if another thread can receive message, can be used here.

the dll only need to know where the keyboard message should be post. The destination can be a window or a thread.

kakalake
March 14th, 2003, 06:19 PM
Hello!
I am sure you installed a keyboardhook in your dll an now you want to send the keyboardevents to your window. Itīs an better idea to send!!! a WM_COPYDATA event to your window.
cu