Install_Exception_Handler

include vmm.inc

mov     esi, Exception          ; points to an Exception_Handler_Struc
VMMCall Install_Exception_Handler

jc      not_installed           ; carry flag set if error
 

Installs a ring-0 exception handler. Uses Flags.

Exception
Address of an Exception_Handler_Struc structure containing information about the exception handler to install.

The system saves a pointer to the specified Exception_Handler_Struc structure instead of copying it. Therefore, the structure must not be in pageable memory, and must not be freed or overwritten until the exception handler is removed.

The system calls the exception handler only if the exception occurs within the range of addresses specified by the EH_StartIP and EH_EndIP fields in the Exception_Handler_Struc structure. The system calls the exception handler with the stack and all registers in same state as when exception occurred.

You can use the Remove_Exception_Handler service to remove an exception handler that was installed using this service.

See Also

Exception_Handler_Struc, Remove_Exception_Handler