P
Paul
Hi,
I am working with VS2008 and I am looking for a good way to transfer data
from one C#-application to another one. Both application are on the same
machine.
I found this example working with an ipc channel
http://msdn.microsoft.com/de-de/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx
The example is very good, it is running on my computer. I think, that the
'class RemoteObject'
is created by the .NET framework and running in a different thread than the
server-thread. Correct?
Now I added a method to transport a string to the server:
// Remote object.
public class RemoteObject : MarshalByRefObject
{
private int callCount = 0;
public int TransportData(string txt)
{
Console.WriteLine(txt);
return 0;
}
public int GetCount()
{
Console.WriteLine("GetCount has been called.");
callCount++;
return(callCount);
}
}
Okay!
But now I want to consume the string sended to the server.
How can the server get access to the string (means: copy the content)?
And how to send an event to the servers main-thread saying 'new data arrived'?
Thanks for your answer!
I am working with VS2008 and I am looking for a good way to transfer data
from one C#-application to another one. Both application are on the same
machine.
I found this example working with an ipc channel
http://msdn.microsoft.com/de-de/library/system.runtime.remoting.channels.ipc.ipcchannel.aspx
The example is very good, it is running on my computer. I think, that the
'class RemoteObject'
is created by the .NET framework and running in a different thread than the
server-thread. Correct?
Now I added a method to transport a string to the server:
// Remote object.
public class RemoteObject : MarshalByRefObject
{
private int callCount = 0;
public int TransportData(string txt)
{
Console.WriteLine(txt);
return 0;
}
public int GetCount()
{
Console.WriteLine("GetCount has been called.");
callCount++;
return(callCount);
}
}
Okay!
But now I want to consume the string sended to the server.
How can the server get access to the string (means: copy the content)?
And how to send an event to the servers main-thread saying 'new data arrived'?
Thanks for your answer!