ServiceBase.RequestAdditionalTime(Int32) Method

Definition

Requests additional time for a pending operation.

public:
 void RequestAdditionalTime(int milliseconds);
public void RequestAdditionalTime (int milliseconds);
[System.Runtime.InteropServices.ComVisible(false)]
public void RequestAdditionalTime (int milliseconds);
member this.RequestAdditionalTime : int -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.RequestAdditionalTime : int -> unit
Public Sub RequestAdditionalTime (milliseconds As Integer)

Parameters

milliseconds
Int32

The requested time in milliseconds.

Attributes

Exceptions

The service is not in a pending state.

Remarks

The RequestAdditionalTime method is intended to be called by the overridden OnContinue, OnPause, OnStart, or OnStop methods to request additional time for a pending operation, to prevent the Service Control Manager (SCM) from marking the service as not responding. If the pending operation is not a continue, pause, start, or stop, an InvalidOperationException is thrown.

Applies to

See also