Export (0) Print
Expand All

ServiceBase.OnContinue Method

When implemented in a derived class, OnContinue runs when a Continue command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service resumes normal functioning after being paused.

[Visual Basic]
Protected Overridable Sub OnContinue()
[C#]
protected virtual void OnContinue();
[C++]
protected: virtual void OnContinue();
[JScript]
protected function OnContinue();

Remarks

Implement OnContinue to mirror your application's response to OnPause. When you continue the service (either through the Services add-in or programmatically), the OnContinue processing runs, and the service becomes active again.

OnContinue is expected to be overridden when the CanPauseAndContinue property is true.

If CanPauseAndContinue is false, the SCM will not pass Pause or Continue requests to the service, so the OnPause and OnContinue methods will not be called even if they are implemented. In the SCM, the Pause and Continue controls are disabled when CanPauseAndContinue is false.

Requirements

Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ServiceBase Class | ServiceBase Members | System.ServiceProcess Namespace | CanPauseAndContinue | OnPause | OnPowerEvent | OnShutdown | OnStart | OnStop | OnCustomCommand

Show:
© 2014 Microsoft