Sometimes you just want a super simple and lite weight way to send
data from a child process back to its parent. My usual goto is WM_COPYDATA
and subclassing the parent window.
If you want to go more lite weight, you can just use SendMessage and
RegisterWindowMessage, but you are limited to using numeric values and returns only.
Also subclassing carries some weight and complexity with it. For stability I usually use an external Dll to make sure it stable if the user hits the stop button in the ide and make debugging easier for the rest of the project.
If the project is a plugin, or vb ide addin..you want as little complexity as possible and maximum stability.
This made me think of a piss simple IPC mechanism that requires no subclassing and is basically error proof. You can implement it in a minute or two max.
parent process spawns child with argument hwnd=txtRecv.hwnd
child extracts hwnd from command line
child uses PostMessage(hwnd,WM_PASTE,0,0) with text message in clipboard
parent process receives the message when the normal vb txtRecv_Changed event fires.
There are other ways to get the hwnd as well, you could just as easily save it to the registry with Save/GetSetting, or you could use FindWindow api and then enum its children to find it on the fly.
no subclassing, no extra libraries, nothing fancy what so ever. Tested on XP and Win7, should be find on all others since its a base system capability.* (as long as processes have same integrity levels)