mirror of
https://github.com/sp00nznet/xboxrecomp.git
synced 2026-12-05 10:03:01 +00:00
fe15d81bd0
Xbox games re-export shims named exactly like the Win32 APIs they wrap (CreateThread, GetLastError, QueryPerformanceCounter, ..., or onexit from the game's own CRT). The host exe links kernel32.lib et al., so a guest definition with one of those names is LNK2005 at link time (and if a generated header ever sits next to <stdlib.h>, C2373 at compile time). Fold the x64 export names of the Windows import libs (kernel32/user32/ gdi32/advapi32/winmm/ws2_32/ole32/dbghelp/shell32/version/...) into the reserved-name mangler as data/win32_api_names.txt, generated from the Windows SDK with dumpbin /exports. Any such guest function is emitted as Name_<addr> consistently across definition, declaration, call sites and the dispatch row.