Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Simple inter application communication

Started by hutch--, October 04, 2019, 09:03:02 AM

Previous topic - Next topic


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.