先生,我开发一个窗口应用程序软件,我想抵制它作为服务我该怎么办请帮忙做.... [英] Sir I Develop A Software On Window Application I Want To Resisted It As Service How Can I Do Please Help To Do....

查看:79
本文介绍了先生,我开发一个窗口应用程序软件,我想抵制它作为服务我该怎么办请帮忙做....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我先生在Windows应用程序上创建一个软件msi或exe如何在我的系统上作为服务抵制它请帮助我非常紧急....帮助

Sir I Create A software msi or exe on Window Application How we can resisted it as a service on my system please help me its very urgent.... help

推荐答案

您需要开发一个不同的应用程序,Windows服务。它不能承载Windowed应用程序的任何功能。一般情况下,服务在没有任何桌面时有效,因此无法使用UI。如果您想要一些支持您的服务的UI,它应该是另一个使用某些IPC与您的服务进行通信的应用程序,例如命名管道,也可以使用经典远程处理或WCF(在您的服务中自托管)来完成例如,两者都可以通过所谓的IPC频道使用相同的命名管道机制。



请参阅:

< a href =http://en.wikipedia.org/wiki/Windows_Service> http://en.wikipedia.org/wiki/Windows_Service [ ^ ],

http://technet.microsoft.com/en-us/library/cc783643%28v=ws.10%29.aspx [< a href =http://technet.microsoft.com/en-us/library/cc783643%28v=ws.10%29.aspxtarget =_ blanktitle =New Window> ^ ] ,

http://msdn2.microsoft.com/en-us/library /ms685141.as px [ ^ ]。



如果您现有的应用程序具有完全隔离的UI,您可以通过重构方式将某些功能提取到单独的库程序集中,以便在服务和Windows中使用申请。



-SA
You need to develop a different application, Windows Service. It cannot carry any functionality of Windowed application. In general case, the service works when there is no any desktop, so no UI is possible. If you want some UI supporting your service, it should be yet another application which communicates with your Service using some IPC, for example, named pipes, which can also be done using "classical" remoting or WCF (self-hosted in your service), both can use, for example, the same named pipes mechanism via so-called "IPC" channel.

Please see:
http://en.wikipedia.org/wiki/Windows_Service[^],
http://technet.microsoft.com/en-us/library/cc783643%28v=ws.10%29.aspx[^],
http://msdn2.microsoft.com/en-us/library/ms685141.aspx[^].

If your existing application has thoroughly isolated UI, you can possible refactor it the way to extract some functionality into separate library assemblies, to be used in both service and the Windows application.

—SA


这篇关于先生,我开发一个窗口应用程序软件,我想抵制它作为服务我该怎么办请帮忙做....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆