Communication between windows service and desktop app

。_饼干妹妹 提交于 2019-12-23 09:37:57

问题


I want to create a communication between a windows service and a desktop application on Windows 7. I read that named pipes are one way for communication between two processes. Can i use them for my purpose?


回答1:


sure you can use named pipes, WCF many other IPC methods.

for named pipe example among stack overflow questions, see here as well for some backgound:

Inter process communication using Windows service

also check this one: GUI and windows service communication




回答2:


As indicated above, there are lots of options available. Just be aware that if you go the TCP/IP route (e.g. WCF), the user will have to have a valid network connection (a loopback adapter will work) otherwise your client and service won't be able to communicate.




回答3:


Go with WCF, it's a good solution to start.



来源:https://stackoverflow.com/questions/7791471/communication-between-windows-service-and-desktop-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!