Hi,
I am new here. I need some help on inter-process communication.

I am developing a high performance console app in C# 4.0. The reason i chose console to winform because to minimize the GUI thread overheads. But i need to view the processing statistics from time to time (occasionally only, to check not monitoring). Just few variables values need to be accessed.

1. Is there a way like accessing web-service? let's say i have some volatile variables signed as public in a public class.

Any suggestion will be considered a help, as i need some ideas. Thank you guys.

You can have your main app create a shared memory space and store whatever you need there. Then your monitoring app can read the values it needs. This is faster than using pipes, RPC or WCF, but is restricted to running on the same machine as your main app.

You can use Memory Mapped Files if you want to stick with safe code. If you are willing to use unsafe code, it's a little more complex but it is faster and you can directly map variables unto the memory space (this makes access to it just setting or getting the value of a variable). You'll have to deal with cross app signaling since you don't want one app writing while the other is reading

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.