I can give you some C++ example code from my web plugin system which does inter-process communication using two DLLs.
Since it's kind of ugly and unfinished code, the best solution, of course, is to search for WM_COPYDATA on Google.
It is a window message which takes a pointer to a variable. It makes this variable accessible to the target window's process and it sends the message to that process.
There may be a bit of complexity using Mutexes for this job, though, as the whole inter-process communication thing requires that you have a window handle for the process. (I'm not sure about windowless processes here... maybe someone else knows that).
Can we get an actual process handle from a mutex, or is it just one single string that tells us some program, somewhere, is running and wrote the same mutex as the one we're looking for?
Nonetheless, in order to send messages between your program instances, you would need some way for one of the instances of your program to blindly seek out the other one's window handle using FindWindow, some kind of FindProcess thing (does one exist?), or mysterious mutex functionality.
I, for one, have always despised the concept of searching for window titles to find another application. There may be a better way.
Since it's kind of ugly and unfinished code, the best solution, of course, is to search for WM_COPYDATA on Google.
It is a window message which takes a pointer to a variable. It makes this variable accessible to the target window's process and it sends the message to that process.
There may be a bit of complexity using Mutexes for this job, though, as the whole inter-process communication thing requires that you have a window handle for the process. (I'm not sure about windowless processes here... maybe someone else knows that).
Can we get an actual process handle from a mutex, or is it just one single string that tells us some program, somewhere, is running and wrote the same mutex as the one we're looking for?
Nonetheless, in order to send messages between your program instances, you would need some way for one of the instances of your program to blindly seek out the other one's window handle using FindWindow, some kind of FindProcess thing (does one exist?), or mysterious mutex functionality.
I, for one, have always despised the concept of searching for window titles to find another application. There may be a better way.