This documentation is archived and is not being maintained.

ServiceController.Pause Method

Suspends a service's operation.

[Visual Basic]
Public Sub Pause()
public void Pause();
public: void Pause();
public function Pause();


Exception Type Condition
Win32Exception An error occurred when accessing a system API.
InvalidOperationException The service cannot be paused.


You cannot call Continue for the service until the service controller status is Paused.


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

ServiceController Class | ServiceController Members | System.ServiceProcess Namespace | CanPauseAndContinue | Continue | Status