.NET IPC / Remoting

Associate
Joined
9 Feb 2006
Posts
81
Hey all,

Using VB.net I'm looking at having one program invoke another program.

e.g. trayprog.exe will invoke database.exe - making one of database.exe's forms appear.

Found a wealth of info on google & MSDN, and Inter Process Communication seems to be achievable using a technology MS call 'Remoting'.

However does anyone have a perhaps quick and dirty sample (c# or VB welcomed) or experience to help sole my problem?

Thanks.
 
Depends what you want to do - if you just want to run an EXE its really easy - but are you talking more about executing the program and then communicating data to and from it?
 
http://www.codeproject.com/KB/IP/remotingchatsample.aspx seems to have what you want, with the exception of starting the instance, which is the easiest part of your problem.

I'm not a remoting expert, but that seems to be a very simple client / server app which is based around sending messages and getting a response, which seems to be what you are asking for? The sample just sends simple structs, but it wouldnt be hard to expand on that.

On the flip side, I'm pretty sure its possible to have a situation where the one program has a complete handle on another and can invoke methods directly (rather than sending messages). Not sure how you would go about this - but hopefully this post has either helped you, or increased the detail of your original request :)
 
Make Database.exe a DLL file instead. It will be much easier to interface than trying to get things out of an exe.

TrUz
 
Thanks Goksly I hadn't come across that article in my search on codeproject. The message passing could provide a temporary and inital solution to my problem.

However later on down the line I know the 2 programs will likely become 4+ and that there will be more activity between the clients and
server.

Also there isn't as such a need to pass data, more to invoke and trigger events.

So I'm reluctant to start building a message passing system based on this.
 
Back
Top Bottom