Delphi - 使用Form安装,启动,停止服务 [英] Delphi - Install , Start ,Stop Service inside application with Form
问题描述
我有Delphi应用程序,我添加了服务,我如何通过主窗体按钮安装并启动和停止
i have Delphi application and i added service to it , how can i install and start and stop it by Main Form buttons ?
我可以在单独的项目服务中执行,但我的目标是使服务接口控制。
i can do it in separate project service , but my goal is make interface for service to control it .
谢谢
推荐答案
您不能在同一个应用程序中为您的服务提供可视化界面。
You can't have a visual interface to your service in the same application any longer.
从Windows Vista及更高版本开始,服务在与用户不同的桌面中运行,无法与用户直观地交互。您需要编写一个单独的应用程序,通过命名管道,邮槽或某种其他形式的进程间通信与您的服务进行通信,或通过其中一个 服务控制功能
。
As of Windows Vista and above, services run in a different desktop than the user and can't visually interact with the user. You need to write a separate application that communicates with your service via named pipes, mailslots, or some other form of interprocess communication, or through one of the service control functions
available through the Windows API.
这篇关于Delphi - 使用Form安装,启动,停止服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!