Forcing Shutdown for Program Testing

This section describes the sample shutdown program to test an RTX64 program with shutdown handlers by forcing a Windows stop event.

Shutdown Program

Use the shutdown program to see a demonstration of RTSS shutdown handlers. This program attaches a shutdown handler to a process and generates a continuous tone. If a Windows stop or system shutdown occurs during this time, then the shutdown handler prints out a message and sleeps for 10 seconds. The tone will then stop.

NOTE: The message is visible only for unexpected Windows stop events (RT_SHUTDOWN_NT_STOP). For an orderly Windows shutdown (RT_SHUTDOWN_NT_SYSTEM_SHUTDOWN), the message is not visible.

Usage

RTSSrun "%public%\Public Documents\IntervalZero\RTX64 SDK\4.5\Samples\Shutdown\<Visual Studio Version>\x64\RTSSRelease\SrtmWShutdown_<Visual Studio Version>"

You can view the shutdown process or stop the shutdown program and its tone without shutting down Windows by using RTSSkill:

Usage (to view the shutdown process):

RTSSkill

Usage (to kill the shutdown process n):

RTSSkill n
 
%public%\Public Documents\IntervalZero\RTX64 SDK\4.5\Samples

APIs Referenced

RTAPI

Supported Windows API