本文介绍了如何调用从另一个Windows服务运行Windows服务的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为WindwosService1的Windows服务,它已在后台运行。我必须创建另一个Windows服务,它将在运行时调用WindwosService1的方法。如何实现这一目标。我是c#的新手,即使是最轻微的帮助也会非常感激!谢谢!



编辑:WindowsService1已经创建了我无法更改的服务。我只需要安装它并运行它。这个Windows服务有一个所需的方法,我想用另一个我将创建的Windows服务(WindowsService2)调用。是否有可能使用WCF公开已创建服务的方法(WindowsService1,我没有权利修改)?



我尝试过:



我尝试添加对服务的引用并通过该引用调用方法。

I have a windows service called WindwosService1 which is already running in the background. I have to create another windows service which will call the method of WindwosService1 while its running. how to achieve this. I am new to c# and even a slightest help will be much appreciated! thank you!

WindowsService1 is already created service which i cannot change. i just have to install it and run it. this windows service has a desired method which i want to call using another windows service (WindowsService2) which i will be creating. is it possible to expose method of already created service(WindowsService1 which i dont have rights to modify) using WCF?

What I have tried:

I have tried adding a reference to the service and calling the method by that reference.

推荐答案


这篇关于如何调用从另一个Windows服务运行Windows服务的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 23:50