Is it possible to pass char* between 2 applications using a custom message in SendMessage? I know it is possible using WM_COPYDATA, but I want to know if I can send this using custom message(WM_USER + ..)
Thank you!
WM_COPYDATA has been specifically invented because what you ask is not feasible directly. This because different applications live in different address spaces, so a pointer passed from an application has no meaning in another one.
WM_COPYDATA deals with the problem by using some IPC mechanism under the hood, which is what you usually do when you want to share data with another application; viable options are the usual ones: pipes, shared memory & co, have a look here to see what Windows provides.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With