打印本文 打印本文 关闭窗口 关闭窗口
windwos 2000及NT 服务注册的具体实现
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2291  更新时间:2009/4/23 18:38:21  文章录入:mintao  责任编辑:mintao
ScmHandle<>0 Then
    Begin
      RHandle := 0;
      RHandle :=OpenService(ScmHandle,PChar(ServiceName),SERVICE_ALL_ACCESS );
      If RHandle <>0 Then
      Begin
        QueryServiceStatus(RHandle,Rec_status);
        if rec_status.dwCurrentState =SERVICE_RUNNING then
           result :=True;

        {关闭句柄}
        CloseServiceHandle(RHandle);
      End;
    End;
  Except
  End;

end;

end.

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口