Responder Developer Guide
Stop Method (Program)
Example 


The amount of time to wait for the associated process to exit before abnormal termination.
Stops the program.
Syntax
'Declaration
 
Public Sub Stop( _
   ByVal timeout As TimeSpan _
) 
'Usage
 
Dim instance As Program
Dim timeout As TimeSpan
 
instance.Stop(timeout)
public void Stop( 
   TimeSpan timeout
)

Parameters

timeout
The amount of time to wait for the associated process to exit before abnormal termination.

Return Value

true if the associated process exited gracefully; otherwise, false if the process was killed (abnormal termination).
Remarks

The underlying Process.WaitForExit is based upon milliseconds, so the timeout value will be converted to total milliseconds. For most situations this isn't important, but is for understanding the behavior of boundary conditions.

You can specify a negative number for the timeout (in milliseconds), but it is treated by as a very large positive number. If you pass zero to the method, it returns true only if the process has already exited. The maximum is the largest possible value of a 32-bit integer, which represents infinity to the operating system.

Example
To wait 5 minutes for the process to exit gracefully before killing the process. To wait indefinitely for the process to exit gracefully (never kill). To kill the process immediately (never give it a chance to shutdown on it's own gracefully)
Stop(TimeSpan.FromMinutes(5.0));
Stop(TimeSpan.FromMilliseconds(int.MaxValue));
Stop(TimeSpan.FromMilliseconds(0));
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

Program Class
Program Members

 

 


Send Comment