Can I have my Window exe (with a GUI) expose a COM interface
I have a C# based windows exe using a WPF GUI. My GUI app. polls another window service every minute running开发者_运维知识库 on same machine for some updates. Can i expose a COM interface into my WPF GUI exe so that i can remove polling and instead window service make a COM call into the WPF GUI exe app to provide updates?
You probably could, but why COM? You could just as well use .NET communication technologies like Remoting or WCF.
That said, it's usually better to let the UI client initiate the communication to the Windows service and not the other way around. Mainly because you can have multiple client apps running (if more than one user is logged on to the machine).
精彩评论