Sending a string as a message

  • Thread starter Thread starter Odd Magne Hågensen
  • Start date Start date
O

Odd Magne Hågensen

How can I send a string from one application to another?

I want to send debug messages from any applicaton to a debug application,
whose only task is to receive strings and show them in a list box.




Odd Magne Hågensen
 
One way to archive this is to look at Remoting. See
namespace System.Runtime.Remoting.

Thanks,
 
BuddyWork,

Using SendMessage won't work. The reason for this is that the pointer
that you pass in the lparam or wparam parameters won't be valid in the new
process (unless you point to some sort of shared, global memory).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

You can also use the Windows API SendMessage if know the
window handle.
 
Odd Mange Hågensen,

There are a number of options here. One would be to write the messages
to a file, and have your other app read the file. Another would be to use a
Serviced Component that is shared out of process (have the pool size for the
component have a min and max pool size of one to create a singleton). One
would call methods to store the items in the log, another would remove them
(kind of like a stack).

And of course, there is the remoting solution as well.

Hope this helps.
 
I was thinking about the shared memory approach when I
mentioned the SendMessage. I should of mean a bit clearer.
-----Original Message-----
BuddyWork,

Using SendMessage won't work. The reason for this is that the pointer
that you pass in the lparam or wparam parameters won't be valid in the new
process (unless you point to some sort of shared, global memory).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

You can also use the Windows API SendMessage if know the
window handle.
-----Original Message-----
How can I send a string from one application to another?

I want to send debug messages from any applicaton to a debug application,
whose only task is to receive strings and show them in a list box.




Odd Magne Hågensen


.


.
 
Back
Top