WKA (Windows Kill Application)

Syntax

WKA

Description

The Windows Kill Application (WKA) command terminates the current task by simulating a fatal error.

There may be times when you want to halt your program immediately. You can force an immediate interrupt of a CVW session by pressing CTRL+ALT+SYSREQ. You then have the opportunity to change debugging options, such as setting breakpoints and modifying variables. To resume continuous execution, press F5; to single-step, press F10.

You should take care when you interrupt the CVW session. For example, if you interrupt the session while Windows code or other system code is executing, using the Step or Trace functions produces unpredictable results. When you interrupt the CVW session, it is usually safest to set breakpoints in your code and then resume continuous execution rather than using Step or Trace.

If the current code is in your application, you can safely use the WKA command without affecting other tasks. However, the WKA command does not perform all the cleanup tasks associated with the normal termination of a Windows application.

For example, global objects created during the execution of the program but not destroyed before you terminated the program remain allocated in the global heap. This reduces the amount of memory available during the rest of the Windows session. For this reason, you should use the WKA command to terminate the application only if you cannot terminate it normally.

For more information on using the Windows Kill Application (WKA) command, see Chapter 10.