A desktop app (made in Delphi) is started by User A. Let's call it "Instance A".
User A does a "switch user" and User B logs in.
User B runs the same application. Let's call it "Instance B"
What I want now, is a way for the Instance B to send messages to Instance A.
I tried the following: Instance A writes its handle in a file, so Instance B can open that file, read the handle, and use it to post a message to Instance A, but it doesn't work -- perhaps for security reasons Windows doesn't give one user access to handles of running processes of another user...
A "bad" way to do this would be to have Instance A check a particular file or registry location every few seconds, so Instance B can write something there and Instance A will get it... but this is obviously a burdensome and unelegant solution.
Instead what I need is a way for Instance B of user B to send a harmless message to Instance A of user A, after which Instance A wakes up and decides what to to about it.
Thanks for any suggestions!