Search code examples
windowsprocessseh

Vectored Exception Handling Process wide?


I know Windows seperatly builds a Structered Exception Handling Chain for each running thread within a process. I was wondering if with veh, the registered exception handler will be called process wide (no matter in what threat the exception occured) or was also registered on a per thread basis?


Solution

  • Yes, vectored exception handlers are process wide.

    From MSDN:

    An application can register a function to watch or handle all exceptions for the application. Vectored handlers are not frame-based, therefore, you can add a handler that will be called regardless of where you are in a call frame.

    New Vectored Exception Handling in Windows XP by Matt Pietrek states:

    The handler list is not tied to any thread, and is global to the process.