mirror of https://github.com/decompals/wibo.git
Luke Street
c4de05946d
`TlsGetValue` disambiguates 0 and an error by relying on `GetLastError`. Depending on the program state, `GetLastError` could be non-0, even though `TlsGetValue` succeeded. Resolve this by always setting `wibo::lastError`. This matches the behavior described by the documentation. Additionally, when reading resources, later versions of mwcc and mwld call `GetModuleHandleA` with the program path, and then call `LoadStringA` on that handle. Support this behavior by _actually_ loading the PE at the path passed in to `GetModuleHandleA`, instead of assuming it's the current program. (This is especially useful because sjiswrap relies on overriding `GetModuleFileNameA`, so the wrapped program reads its own resources, rather than sjiswrap's.) Other small changes: - Add ms-win-crt `exit` & run atexit funcs - Implements vcruntime `memmove` - Implements kernel32 `GetModuleFileNameA` |
||
---|---|---|
.. | ||
advapi32.cpp | ||
bcrypt.cpp | ||
crt.cpp | ||
kernel32.cpp | ||
lmgr.cpp | ||
mscoree.cpp | ||
msvcrt.cpp | ||
ntdll.cpp | ||
ole32.cpp | ||
user32.cpp | ||
vcruntime.cpp | ||
version.cpp |