I started the process, how can I call a method in this process

My VB6 macro (COM) successfully called my managed code, a COM-visible stub. My COM visible stub successfully started my WPF process (.exe). "Life is good". Now I need to access the method in my WPF process and pass some parameters.

I know that I can start my WPF process with parameters, but my VB6 macro sometimes calls my COM-visible stub with new parameters, and I need to pass this to my current process.

I was thinking of stopping / restarting my process with new parameters, but this seems a bit extreme.

How do I access a method running my current process?

+5
source share
2 answers

From the point of view of the operating system, the process has no methods. Thus, the only way to communicate between processes is to use some kind of interprocess communication. In C #, you can use the IPO Remoting or WCF channel. Take a look here .

+1
source

You can host the WCF service inside your WFP application. Then you can call your COM code for the service.

+1
source

All Articles