KillTaskByName

Demonstrates how to terminate a process by referring to its process name.

Remarks

This example illustrates how to terminate the program FLY! by using its process name.

Note: when running under UNIX systems, using Java, this routine is not supported. You must use the KillTask() routine.

Code

 local int PID, int PID2, int Success

 PID = RunTask("fly", "", "", Null)
 
 call Sleep(3)

 Success = KillTaskByName( "fly" )

 Print "Task killed? ", Success

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.