My VB6 macro (COM) has successfully called into my managed code, COM-visible stub. My COM-visible stub has successfully started my WPF process (.exe). "Life is good". Now, I need to access a method within my WPF process and pass in some parameters.
I know that I can start my WPF process with parameters, but my VB6 macro will occasionally call my COM-visible stub with new parameters and I need to pass this into my running process.
I've thought of stopping/re-starting my process with new parameters, but that seems somewhat extreme.
How do I access a method withing my running process?
From the operating system's point of view, a process doesn't have methods. So the only way to communicate between processes is to use some kind of inter-process communication. In C#, you could using a Remoting IPC channel or WCF. Take a look here.
You can host a WCF service inside your WFP application. You can then have your COM code call the service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With