Augie said:
You are welcome.
Can you use WM_COPYDATA with .NET?
Well, yes. There is something called Platform/Invoke (aka P/Invoke) which
allows managed code to call unmanaged functions. Using it is one way a .Net
application can send an ordinary message to an arbitrary window. Basically
you would P/Invoke FindWindow() and SendMessage().
Does .NET offer something better?
Well, yes. A decade and a half ago, Windows messages were just about the
only IPC techinque available on Windows. These days there are other, better
options. I tried to offer some suggestions in my last post to you.
If you can use WM_COPYDATA, then how do implement this?
You use FindWindow() to locate a window and SendMessage() to pass it some
data.
How do you find a ProcA using VC++ .NET to pass to SendMessage?
Processes are not "sinks". Windows are, sockets are, pipes are, mail slots
are, yada yada yada.
How do I implement the message loop in a .NET app (ProcB) to look at the
WM_COPYDATA message?
It is not something that I have tried but it _may_ be that it is with
preProcessMessage().
Are there any specific sample out there on how to do this?
Can I ask what you are sending? How much? How often? Perhaps someone will be
able to point you to a sample.
Regards,
Will