|
NOTE: To build this sample in Visual Studio 2015 in a RTSSRelease configuration, you must add the following libraries in Properties > Input:
Description
Demonstrates the use of a system shutdown handler in an application.
Source Files
Shutdown project source file:
Shutdown.c
sets up a continuous periodic timer that drives the
speaker. When the shutdown occurs (either a normal Windows shutdown or a "blue
screen" stop), the shutdown handler is called and it prints out a
message, waits another 10 seconds, and then stops the timer and returns,
allowing Windows to complete the shutdown. Use
"net start gencrash" to generate a Windows "blue screen"
stop, or use the "start" button and "shutdown" menu
to test the two types of shutdown behavior. Build the Sample
Run the Sample
Remarks
The shutdown program should be built as an .rtss executable binary file and run in the real-time environment. The RTX API call RtAttachInterrupt will not run in the Win32 environment.
See also Shutdown Handling.
APIs Referenced
RTAPI |
Win32 APIs |