Author Topic: Simple inter application communication  (Read 322 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6768
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Simple inter application communication
« on: October 04, 2019, 09:03:02 AM »
Communicate and control between two executable files is a reasonably simple technique using SendMessage() with the handle HWND_BROADCAST. Attached is an example of a caller app and a slave app that communicate back and forth using the method mentioned before. It is as simple as registering a couple of Windows messages and using SendMessage to send them between the two apps.

To test the example, start the "slave.exe" app and move it away from the centre of the screen. Then start the "caller.exe" app. It has a list of buttons on the toolbar that send different messages to the slave app that in turn sends a confirmation message back to the caller.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: