문제

MSDN describes UnhandledExceptionFilter as follows: "An application-defined function that passes unhandled exceptions to the debugger, if the process is being debugged."

But this function is clearly supplied by the OS, in kernel32.dll according to that same page.

So why do they call it an application-defined function?

도움이 되었습니까?

해결책

Yes, very awkward language. It is a prototype definition of a function. Which you can use with the __except keyword or as an argument to SetUnhandledExceptionFilter(). Either would make yours an 'application defined function'.

There's default handling if you do neither, the debugger automatically stops at an unhandled exception. Which I suppose is what they meant with "that passes exceptions to the debugger". The SDK docs for SEH deserve an all-around failing grade.

다른 팁

UnhandledExceptionFilter() itself is not a function of its own provided by the kernel (although the kernel does implement its own default implementation that is used until you override it with your own). The UnhandledExceptionFilter() documentation you quote describes a function prototype that you have to follow if you choose to implement your own function and pass it to the SetUnhandledExceptionFilter() function to activate it within the kernel.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top