1

I'm using SendMessage method (WinAPI) to pass messages between 4 applications.
I want to create another application, calling LogApplication, that using like a log application, meaning that any message was sent from application to application via SendMessage insert into a log file.
I can to "catch" all the messages that send even if the 4 applications isn't send the message to LogApplication? i can catch all the messages that sent via SendMessage method?
If so, how?
Thanks.

SendMessage: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx

Evyatar Elmaliah
  • 634
  • 1
  • 8
  • 23

1 Answers1

2

This is what Hooks are for. You install it with the use of SetWindowsHookEx, WH_GETMESSAGE should be fine for you. You will find examples in those SO:

Global hook using WH_GETMESSAGE and WH_KEYBOARD

WH_GETMESSAGE global hook not working

Community
  • 1
  • 1
marcinj
  • 48,511
  • 9
  • 79
  • 100