CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    18

    send message to exe from dll

    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

  2. #2
    Join Date
    Dec 2002
    Posts
    214
    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.

  3. #3
    Join Date
    May 2000
    Location
    Germany
    Posts
    369
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured