如何隱藏服務的進程? ( 积分: 50 )

  • 主题发起人 主题发起人 takdick
  • 开始时间 开始时间
T

takdick

Unregistered / Unconfirmed
GUEST, unregistred user!
我用的是xp,想寫一個服務程序,以下代碼只是在服務啟動時showmessage('start');現請問為何在進程裡仍可看到test.exe,如何才能隱藏它?<br>procedure ServiceController(CtrlCode: DWord); stdcall;<br>begin<br> &nbsp;test.Controller(CtrlCode);<br>end;<br><br>procedure Ttest.ServiceStop(Sender: TService; var Stopped: Boolean);<br>begin<br>Stopped := True;<br>end;<br><br>function Ttest.GetServiceController: TServiceController;<br>begin<br> &nbsp;Result := ServiceController;<br>end;<br><br>procedure Ttest.ServiceExecute(Sender: TService);<br>begin<br>while not Terminated do<br>begin<br>Sleep(10);<br>ServiceThread.ProcessRequests(False);<br>end;<br>end;<br><br>procedure Ttest.ServicePause(Sender: TService; var Paused: Boolean);<br>begin<br>Paused := True;<br>end;<br><br>procedure Ttest.ServiceShutdown(Sender: TService);<br>begin<br>Status := csStopped;<br>ReportStatus();<br>end;<br><br>procedure Ttest.ServiceStart(Sender: TService; var Started: Boolean);<br>begin<br>Started := True;<br>showmessage('start');<br>end;<br><br>procedure Ttest.ServiceContinue(Sender: TService; var Continued: Boolean);<br>begin<br>while not Terminated do<br>begin<br>Sleep(10);<br>ServiceThread.ProcessRequests(False);<br>end;<br>end;
 
我用的是xp,想寫一個服務程序,以下代碼只是在服務啟動時showmessage('start');現請問為何在進程裡仍可看到test.exe,如何才能隱藏它?<br>procedure ServiceController(CtrlCode: DWord); stdcall;<br>begin<br> &nbsp;test.Controller(CtrlCode);<br>end;<br><br>procedure Ttest.ServiceStop(Sender: TService; var Stopped: Boolean);<br>begin<br>Stopped := True;<br>end;<br><br>function Ttest.GetServiceController: TServiceController;<br>begin<br> &nbsp;Result := ServiceController;<br>end;<br><br>procedure Ttest.ServiceExecute(Sender: TService);<br>begin<br>while not Terminated do<br>begin<br>Sleep(10);<br>ServiceThread.ProcessRequests(False);<br>end;<br>end;<br><br>procedure Ttest.ServicePause(Sender: TService; var Paused: Boolean);<br>begin<br>Paused := True;<br>end;<br><br>procedure Ttest.ServiceShutdown(Sender: TService);<br>begin<br>Status := csStopped;<br>ReportStatus();<br>end;<br><br>procedure Ttest.ServiceStart(Sender: TService; var Started: Boolean);<br>begin<br>Started := True;<br>showmessage('start');<br>end;<br><br>procedure Ttest.ServiceContinue(Sender: TService; var Continued: Boolean);<br>begin<br>while not Terminated do<br>begin<br>Sleep(10);<br>ServiceThread.ProcessRequests(False);<br>end;<br>end;
 
后退
顶部