0%

Python注册Windows SEH过滤器,捕获SEH异常

1
2
3
4
5
6
7
import ctypes

@ctypes.WINFUNCTYPE(ctypes.wintypes.LONG, ctypes.c_void_p)
def windows_seh_dummy_handler(exception_info_pointer):
return 1 # EXCEPTION_EXECUTE_HANDLER

ctypes.windll.kernel32.SetUnhandledExceptionFilter(windows_seh_dummy_handler)
请我喝瓶肥仔快乐水?

欢迎关注我的其它发布渠道