Data cannot be shared because different programs (processes) have different address spaces in memory (called separate process address spaces).
For Windows, WM_COPYDATA message to transfer data between processes.
There are many other mechanisms. You can choose the most comfortable one according to the situation.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx#base.using_the_clipboard_for_ipc
© 2024 OneMinuteCode. All rights reserved.