Block exchndl.dll loading for XP/Vista users

This commit is contained in:
mazmazz 2018-12-13 18:10:01 -05:00
parent 1029463741
commit 209f18cf11
3 changed files with 28 additions and 3 deletions

View file

@ -149,7 +149,14 @@ int main(int argc, char **argv)
)
#endif
{
LoadLibraryA("exchndl.dll");
// XP and Vista users can't use the newest exchndl.dll
// and older exchndl.dll won't work with release builds >= 2.1.21
// Check for >= Version 6.1 (>= Win7)
DWORD winversion = GetVersion();
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
if (major > 6 || (major == 6 && minor > 0))
LoadLibraryA("exchndl.dll");
}
}
#ifndef __MINGW32__

View file

@ -218,7 +218,14 @@ int main(int argc, char **argv)
#endif
)
{
LoadLibraryA("exchndl.dll");
// XP and Vista users can't use the newest exchndl.dll
// and older exchndl.dll won't work with release builds >= 2.1.21
// Check for >= Version 6.1 (>= Win7)
DWORD winversion = GetVersion();
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
if (major > 6 || (major == 6 && minor > 0))
LoadLibraryA("exchndl.dll");
}
}
#endif

View file

@ -663,8 +663,19 @@ int WINAPI WinMain (HINSTANCE hInstance,
#endif
// Try Dr MinGW's exception handler.
if (!pfnIsDebuggerPresent || !pfnIsDebuggerPresent())
{
#endif
// XP and Vista users can't use the newest exchndl.dll
// and older exchndl.dll won't work with release builds >= 2.1.21
// Check for >= Version 6.1 (Win7)
DWORD winversion = GetVersion();
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
if (major > 6 || (major == 6 && minor > 0))
LoadLibraryA("exchndl.dll");
#if 0
}
#endif
LoadLibraryA("exchndl.dll");
#ifndef __MINGW32__
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);