Thanks for the reply.
I have looked at those docs...
Can you use WM_COPYDATA with .NET?
Does .NET offer something better?
If you can use WM_COPYDATA, then how do implement this?
How do you find a ProcA using VC++ .NET to pass to SendMessage?
How do I implement the message loop in a .NET app (ProcB) to look at the
WM_COPYDATA message?
Are there any specific sample out there on how to do this?
TIA
Augie
> Thanks for the reply.
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
Augie - 06 May 2004 16:32 GMT
Thanks again.
I'm using WM_COPYDATA.
I have setup the FindWindow and SendMessage code.
Now I'm having trouble finding the necessary info to setup a handler for
this message in a Windows Form VC++ .NET app. How is this done? The Form
Class has no predefined event for this message... does it? How do I do
this?
TIA
Augie
> > Thanks for the reply.
>
[quoted text clipped - 36 lines]
> Regards,
> Will