11 Commits

Author SHA1 Message Date
b87fb5e472 Implement some ActCtx functions for msvcr80.dll 2025-10-05 15:52:38 -06:00
0bc80b6618 Split into HostContextGuard/GuestContextGuard 2025-10-05 14:32:06 -06:00
cd7baffc5e Save/restore fs/gs segments when re-entering host code 2025-10-05 13:58:40 -06:00
8330f27479 Add CreatePipe, CON* support for CreateFileA, more for cygwin 2025-10-02 09:47:41 -06:00
aee35ee0da A few more kernel32 stubs for MSVC versions 2025-10-01 15:20:55 -06:00
705607fcfb Remove now-redundant .dll names from module stubs 2025-09-29 23:35:16 -06:00
01ddf95d36 Add proper resource implementation 2025-09-26 01:51:25 -06:00
c4de05946d
Fix TlsGetValue & more (#48)
`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`
2023-10-01 23:56:35 -04:00
94b44fd697
Everything needed to run simple Rust programs (#40)
* Everything needed to run simple Rust programs

* Add IsDBCSLeadByte implementation

* Address PR comments
2023-09-10 12:07:23 +09:00
Simon Lindholm
42f2e6935e MessageBoxA 2022-07-27 21:27:27 +01:00
Mark Street
11bdc5e8a2
move dlls into dll/ dir (#16) 2022-07-18 09:54:17 -04:00