Send data from Windows Forms application to Window Service

放肆的年华 提交于 2019-12-23 13:08:53

问题


I have a Windows Form where a user can enter data. This data, a complex struct, has to be communicated to a Window Service.

How can I solve this problem in C#?


回答1:


There are four ways to Interact with the windows service.

  1. Through Windows Registry
  2. Through WMI
  3. Through Command
  4. Through interop

Here you can get more Details.




回答2:


If you Right click on the References section in the solution explorer, you will see a menu item for adding a service reference. Once you set that up, you would just reference the service via the new keyword and its name.



来源:https://stackoverflow.com/questions/19771076/send-data-from-windows-forms-application-to-window-service

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