RT.
我需要在.CS文件中关闭一个服务,相关代码如下: ServiceController myService2 = new ServiceController("***");
if (myService != null)
{
if (myService.Status != ServiceControllerStatus.Stopped)
{
bool l = myService.CanStop;
try
{ myService.Stop();}catch(Exception er){ string msg = er.Message;}
}
}运行到myService.Stop()时会出错:
Cannot open *** service on computer '.'.
求高手解答!
我需要在.CS文件中关闭一个服务,相关代码如下: ServiceController myService2 = new ServiceController("***");
if (myService != null)
{
if (myService.Status != ServiceControllerStatus.Stopped)
{
bool l = myService.CanStop;
try
{ myService.Stop();}catch(Exception er){ string msg = er.Message;}
}
}运行到myService.Stop()时会出错:
Cannot open *** service on computer '.'.
求高手解答!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货