First post, by DosFreak
This is a collection of my various API fixes for compatibility with XP games. Unlike most other API fixes these are not EXE hack […]
This is a collection of my various API fixes for compatibility with XP games. Unlike most other API fixes these are not EXE hacks! These are DLL wrappers which means only the portions of code that are XP specific are changed, your windows 2000 code is left intact! These strive for a high level of compatibility so that they can be used for ANY game. Also my kernel32 wrapper has additional features such as GetVersion faking and other options that may be useful. Below is the latest readme, if your game is missing one of the API calls listed it is likely this pack will fix it!
Wrapper Pack v1_2
Windows 2000 XP API Wrapper Pack
THIS PACK IS NOT CREATED/SUPPORTED BY MICROSOFT IN ANYWAY.
WHEN MESSING WITH SYSTEM DLLS YOU CAN HOSE YOUR SYSTEM, READ WHAT THIS DOC SAYS AND FOLLOW IT'S
ADVICE. YOU SHOULD NOT DELETE ANYTHING FROM SYSTEM32, THESE WRAPPERS ARE NOT INTENDED TO BE PLACED
THERE! FOLLOW THIS AND YOU SHOULD BE SAFE. IF YOU ARE A DEV AND KNOW WHAT YOU ARE DOING YOU CAN
BUT DO NOT COME CRYING TO ME. NO WARRANTY, SEE THE END OF THIS FILE FOR MORE INFORMATION.
The Win2k wrapper pack is a collection of DLLs (dynamic loaded libraries) that
'wrap' the Windows API. These wrapper DLLs 'target' original copies of the system DLLs.
Most of these fixes were chosen to get newer games working on 2K. But they might be useful in
other situations as well.
This is NOT meant as a general XP compatibility kit to drop in your system32, while that does
work in MOST cases it is kind of dangerous and I don't recommend it. Rather these DLLs
should be placed along side the executable or in the start directory of the application.
In order to use these wrapper DLLs you MUST copy the original system DLLs somewhere in the
DLL search path with the TARGET name listed below. In my case I have a folder in my PATH
(WINXP_DLLS) that are unique to XP, ie no 2k equivalent. I place my TARGET DLLs here as well.
In some cases (kernel32.dll & user32.dll) the DLL search path must be modified due to 'KnownDLLs'
These KnownDLLs are only loaded from the system32, but this functionality can be disabled by
Regedt32. (*IMPORTANT regedit.exe won't work*) Simply add the DLLs to exclude from 'KnownDLLs' to
this is a multiline value, so place a dll on each line.
Included in this pack should be a ExcludeFromKnownDlls.reg which will set this to kernel32.dll &
user32.dll. A reboot is needed for this to take effect. To see a list of KnownDLLs see
For more info on DLL search paths see this awesome page
DLL Loading Rules in Win32 [http://home.att.net/~raffles1/older/dll_loadi … es_in_win32.htm]
=Current DLL Wrappers=
This DLL provides RAWINPUT for the mouse AND ONLY THE MOUSE. It uses DirectInput8 so only
use this DLL only if you need it (compatibility problems may arise otherwise.)
Tested on ETQW & Hellgate London, implementation is NOT XP compliant so milage may vary.
KERNEL32.DLL TARGET=KERNEL32_ORG.DLL INI=win2k_xp_kernel32.ini
This DLL use a ini file (win2k_xp_kernel32.ini) for advanced configuration. It should
be in the start directory of the application. This ini file is not required, default values will
be used as listed below.
*majVer, minVer, buildNum, majSP, minSP, and versionString are all overrides for GetVersion,
GetVersionExA, and GetVersionExW, if omitted the system value is returned. Using this with msiexec
will not result in anything good (tries to make a bunch of XP calls.)
*GetModuleOriginal if not set to 0 will return a HANDLE to the system kernel32.dll, this might be
useful if kernel32 has a new exports and this and this wrapper is out of date.
*geoNation & geoRegion specify return values for GetUserGeoID. If omitted defaults to
*SystemDirectory overrides the return value for GetSystemDirectoryA & GetSystemDirectoryW. If
omiited returns the system value.
*Load_ACLayers if not set to 0 will do LoadLibrary("aclayers.dll"), this is to get past securom,
which doesn't seem to approve of the wrapper. Make sure to place aclayers.dll somewhere in the
*RewriteExportTable if not set to 0 will do some export hacks for programs that think they know
how to read a PE. (Basically the RVA for the functions in the wrapper will point to KERNEL32_ORG)
Example win2k_xp_kernel32.ini (All default values on MY machine)
Provides two functions present in XP, but meaningless in 2K, always do nothing and return success.
OldCigarette - coder of wrapper pack
OldBoy2k - old fashioned win2k user
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
END OF TERMS AND CONDITIONS
(yes I ripped that from the GPL)