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.