手功,管理工具-->服务编程方式访问,方法也很多,以前我推荐过使用WMI来访问服务(其实是半年前我就发过了)SELECT * FROM Win32_ServiceService Control控件介绍:
该控件要用到一个新的查询字"SELECT * FROM Win32_Service",通过它我们就可以
得到系统中有那些服务存在.为了方便启动和终止一项服务我们可以在ListView中.....具体文章参考:http://www.csdn.net/develop/read_article.asp?id=15346

解决方案 »

  1.   

    谢谢杨过!我说的监控的意思是取得这个服务程序的一些复杂的自定义信息,并不是简单的要“暂停、停止....”。
    最好是监控程序一启动,就能接收到这个Service的一些事件。
      

  2.   

    当然可以,上面只是一个引例子Win32_Service表中的内容很多class Win32_Service : Win32_BaseService
    {
      boolean AcceptPause  ;
      boolean AcceptStop  ;
      string Caption  ;
      uint32 CheckPoint  ;
      string CreationClassName  ;
      string Description  ;
      boolean DesktopInteract  ;
      string DisplayName  ;
      string ErrorControl  ;
      uint32 ExitCode  ;
      datetime InstallDate  ;
      string Name  ;
      string PathName  ;
      uint32 ProcessId  ;
      uint32 ServiceSpecificExitCode  ;
      string ServiceType  ;
      boolean Started  ;
      string StartMode  ;
      string StartName  ;
      string State  ;
      string Status  ;
      string SystemCreationClassName  ;
      string SystemName  ;
      uint32 TagId  ;
      uint32 WaitHint  ;
    };
    而且还有相关的处理方式参考:ms-help://MS.VSCC/MS.MSDNVS.2052/wmisdk/r_32os5_4dyd.htm你把我上面的代码扩充一下,就可以了..
      

  3.   

    是吗!不好意思,不了解WMI。
    我去试试先。