home *** CD-ROM | disk | FTP | other *** search
- '************************** CAUSERIP.MST *********************************
- 'Demonstrates: Trapping a Windows RIP from a MSTest script
- '
- 'Required Files: RIPTRAP.DLL, TOOLHELP.DLL
- '
- 'Uses:
- '
- 'Complexity Level: ADVANCED
- '
- 'Notes: This script simply calls the Windows FatalExit function, which
- ' causes a RIP.
- '
- 'NOTE!: Do not run this script by itself. This script should be run by
- ' TRAPRIP.MST. Load and run TRAPRIP.MST to execute this sample
- ' program.
- '
- ' FatalExit is a Windows function which should only be called by an
- ' application when it wants to inform a debugger (such as CodeView)
- ' that an fatal event has occurred. However, Windows itself will
- ' call FatalExit if you have the Windows debug kernel installed and
- ' certain problems occur with your application. An example is if an
- ' invalid handle is passed to one of the Windows API.
- '
- ' If you are not in a debugger, this causes the RIP information to
- ' be displayed to a debug terminal, and prompts the user for a
- ' response. The result is that the test suite is stopped.
- ' Therefore, you may wish to trap FatalExit so that a test suite can
- ' continue.
- '
- '*************************************************************************
-
- DECLARE SUB FatalExit LIB "KERNEL.EXE" (nErrCode As Integer)
-
- ' Cause a RIP FatalExit (17)
- FatalExit 17
- END
-
-
-