On Tuesday 23 June 2026 10:33:37 LIU Hao wrote:
> 在 2026-6-21 23:08, Pali Rohár 写道:
> > SetUnhandledExceptionFilter is available in all Windows versions since NT 
> > 3.1.
> > ---
> >   .../winstorecompat/src/SetUnhandledExceptionFilter.c            | 2 --
> >   1 file changed, 2 deletions(-)
> > 
> > diff --git 
> > a/mingw-w64-libraries/winstorecompat/src/SetUnhandledExceptionFilter.c 
> > b/mingw-w64-libraries/winstorecompat/src/SetUnhandledExceptionFilter.c
> > index bb90985866af..d4a92ef978e6 100644
> > --- a/mingw-w64-libraries/winstorecompat/src/SetUnhandledExceptionFilter.c
> > +++ b/mingw-w64-libraries/winstorecompat/src/SetUnhandledExceptionFilter.c
> > @@ -22,8 +22,6 @@
> >       DEALINGS IN THE SOFTWARE.
> >   */
> > -#define _WIN32_WINNT 0x501 /* SetUnhandledExceptionFilter is XP+ */
> > -
> >   #define SetUnhandledExceptionFilter __SetUnhandledExceptionFilter
> >   #include <windef.h>
> >   #include <winbase.h>
> 
> This change is fine. However, the commit message says the function
> `SetUnhandledExceptionFilter` is available since Windows NT 3.1, but PSDK
> doc says it's from Windows NT 3.5.

The function is available in all Windows kernel32.dll version, also in
NT 3.1 version (also in Win95 and also in Win32s). See the kernel32.def
file where I collected all those symbol availability information.

Before that I have also checked the WinSDK for NT 3.1 version and that
function is present in the WINBASE.H header file and also in
KERNEL32.LIB import library.

Also all MS compilers for Win32s are unconditionally putting
SetUnhandledExceptionFilter call into the static glued code linked into
every executable (also when compiling for NT 3.1). So this is mostly the
core function which has to be present in any Windows version as
otherwise applications compiled by MS compilers would not run.

So it wrong to say that it is from NT 3.5. Because it is also in NT 3.1.

If somebody is interesting in NT 3.1 SDK DOC, here is archive.org link
for official MS HLP package which documents all NT 3.1 WinAPI functions:
https://archive.org/download/win32-sdk-final-release-nt-31/Microsoft%20Win32%20Software%20Development%20Kit%20Final%20Release%20Version%203.1.iso/MSTOOLS/HELP/API32WH.HLP


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to