Skip to content
Snippets Groups Projects
Commit 209f18cf authored by Marco Z's avatar Marco Z
Browse files

Block exchndl.dll loading for XP/Vista users

parent 10294637
Branches
No related tags found
No related merge requests found
......@@ -149,6 +149,13 @@ int main(int argc, char **argv)
)
#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");
}
}
......
......@@ -218,6 +218,13 @@ int main(int argc, char **argv)
#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");
}
}
......
......@@ -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
#ifndef __MINGW32__
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment