Is it possible to catch an error inside a callback WindowProc? try/ catchdoes not work. It looks like __try __except, and also a hardware exception ( AVfor example) also does not work.
Update:
I realized that it is really possible to throw an exception in the callback WindowProcand catch it using the block catchoutside WindowProc. Tested and working on Windows XP x86. I found the released question 64-bit exceptions in WndProc without problems. The problem seems to exist only on Windows 7 x64(and in accordance with this question on other versions of Windows x64).
So the question is, is it possible to somehow eliminate the exception in WindowProcand catch it using the block catchoutside WindowProc? I installed the patch for Microsoftsoft, set it DisableUserModeCallbackFilterto 1 in the registry, and it is best to get FATAL_USER_CALLBACK_EXCEPTION, not my exception.
source
share