Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - you can use the same exception handling mechanisms to deal with software http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
You can use the same exception handling mechanisms to deal with software
exceptions raised by your application.  The RaiseException function can be
used to throw your own application-defined exceptions.  The first argument
to this function is the exception code.  It would be wise to define your
exception codes so that they do not collide with system defined ones.  The
following example shows how to throw an exception.

Example:

     #define MY_EXCEPTION ( (DWORD) 123L )

         RaiseException( MY_EXCEPTION,
                         EXCEPTION_NONCONTINUABLE,
                         0, NULL );

In this example, the GetExceptionCode() function, when used in an exception
handler filter expression or in the body of an exception handler, would
return the value 123.

See the Win32 SDK documentation for more information on the arguments to the
RaiseException function.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson