Compatibility library for re-establishing Windows XP SP-3 support in VS2019 (and later).
Go to file
2022-12-31 23:38:19 +01:00
CompatLib Don't use option /GL for the library, as it apparently break compatibility with the Intel linker (xilink). 2022-12-31 23:38:19 +01:00
Example Small fix. 2022-12-31 15:32:04 +01:00
.gitignore Initial commit. 2022-12-31 13:47:52 +01:00
CompatLib.sln Added example application. 2022-12-31 14:00:15 +01:00
LICENSE.txt Added license file. 2022-12-31 18:02:23 +01:00
make.cmd Small improvement. 2022-12-31 14:54:24 +01:00
README.md Added README file. 2022-12-31 16:30:43 +01:00

Introduction

CompatLib compatibility library for re-establishing Windows XP SP-3 support in VS2019 (and later).

Executables built with VS2019 (Toolset v142) do not normally run on Windows XP SP-3. That is because the executables created by VS2019 (Toolset v142) depend on certain functions in KERNEL32.DLL that simply did not exist in Windows XP SP-3 yet. Consequently, the executable will fail to start with an error message about the missing entry point! CompatLib provides a workaround for the problem, by eliminating the "problematic" KERNEL32.DLL dependencies from the executable, so that the executable will again be able to run on Windows XP SP-3. This is achieved by substituting the call to the original (missing) function in KERNEL32.DLL with a small "shim" function that is linked directly into the executable. The "shim" function will forward the call to an adequate function in KERNEL32.DLL that does exist on Windows XP SP-3. In fact, there currently are two such function dependencies that must be substituted by CompatLib, i.e. InitializeCriticalSectionEx() and LCMapStringEx().

Note: It still is necessary to install "Service Pack 3" for Windows XP 😏

Usage

In order to build an executable that will run on Windows XP SP-3, the following project settings are required:

  1. The runtime library must be set to Multi-threaded (/MT) static linking is necessary

  2. The minimum required version must be set to 5.1 (32-Bit) or 5.2 (64-Bit)

  3. The matching variant of libcompat.lib must be added to the additional dependencies

License

This work has been released under the CC0 1.0 Universal license.

For details, please refer to:
https://creativecommons.org/publicdomain/zero/1.0/legalcode