On 2009-04-02, Jesse Houwing <(E-Mail Removed)> wrote:
> Hello Tom,
>
>> On 2009-04-02, John <(E-Mail Removed)> wrote:
>>
>>> Hi
>>>
>>> I need to send a string from one dotnet app to another from time to
>>> time. As it is a light weight use I am wondering if there is a light
>>> weight way such as using windows messaging to send this string
>>> without having to resort to remoting etc. I would appreciate any
>>> ideas on how to carry this out. A code example would be great.
>>>
>>> Many Thanks
>>>
>>> Regards
>>>
>> If the apps are on the same machine, then you can do this using
>> SendMessage with WM_COPYDATA. Of course you have to be able to get
>> the hwnd of the other app, etc.
>
> This will be barred if you're runnign Vista if I understood correctly. The
> safest way to do this is using named pipes. And an easy way to have real
> object based communication is to use WCF to communicate between these applications
> (can be configured to either use named pipes or tcp).
> --
> Jesse Houwing
> jesse.houwing at sogeti.nl
>
>
Nothing wrong with named pipes

Especially as they are supported no in the
runtime. But, he asked about the possibility of using windows messaging, so I
thought of WM_COPYDATA...
There are some limitations with WM_COPYDATA under vista, but I thought it had
to do with drivers and services - rather then desktop applications. I could
be wrong, I haven't used this technique for a while - long enough that I
haven't tried it on Vista
--
Tom Shelton