Example code: KiExctHook (15th March 2k2)

On NT based operation systems the "KiUserExceptionDispatcher" API, which is an export
of ntdll.dll, is the second function, after a ring 0 handler, being called every
time an user-level exception is raised. It traces the SEH frames to find a SEH handler
which handles the exception. If no SEH handler is able to do so, the control is given
to the OS, i.e. an error message is shown and the process is terminated or the exception
is passed to a debugger.
This example shows how to hook this powerful API and how to handle exceptions in the
hook routine.
WinXP+ provides the "AddVectoredExceptionHandler" API for this purpose which skips
the dirty work.

yoda

Check: y0da.cjb.net