Commit Graph

17 Commits

Author SHA1 Message Date
Luke Street c9d634876d
Handle special handle value from FindFirstFileA in FindNextFileA (#52) 2023-10-08 13:08:53 -04:00
Luke Street 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
Ethan Roseman 8a6aacb82d
GetLocaleInfoW (#47)
* GetLocaleInfoW for ee-as.exe 991111b

* Try to do it the right way

* 3rd time's the charm?

* round 4

* it doesn't matter now what happens i will never give up the fight

* comments

* fin
2023-09-22 09:13:56 +09:00
ConorB 218b4d7d76
Implement enough process handling logic to make psyq4.0 happy (#46)
* Implement enough process handling logic to make psyq4.0 happy

* revert gitignore

* data type update

* PR review

* DEBUG_LOG mistake

---------

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-09-18 15:05:47 +09:00
Luke Street 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
Luke Street 7d08a2bdca
Various fixes for mwcc/mwld (#32)
* Override GetFileAttributesA for MWCC license.dat

* Add WIN_FUNC to FileTimeToLocalFileTime

* Use callee_pop_aggregate_return(0)

* Lexically normalize paths
2023-01-23 21:22:50 +01:00
Luke Street 6b6a462ea1
Use __attribute__((force_align_arg_pointer)) (#30) 2023-01-23 16:36:14 +01:00
Simon Lindholm 42f2e6935e MessageBoxA 2022-07-27 21:27:27 +01:00
Simon Lindholm ced712df09 Clean up function resolution a little 2022-07-18 23:02:55 +02:00
camthesaxman 97c946fd86
implement SetEndOfFile, CreateDirectoryA, RemoveDirectoryA, SetFileAttributesA (#6)
* implement SetEndOfFile, CreateDirectoryA, RemoveDirectoryA, SetFileAttributesA

* call fflush before ftruncate
2022-07-06 11:26:24 +09:00
Simon Lindholm f11759cc71 mwcc 4.* 2022-06-29 17:34:38 +02:00
Simon Lindholm 916c10543d ole32 2022-06-29 17:26:24 +02:00
Simon Lindholm 81e85504de Improve logging 2022-06-29 16:56:36 +02:00
Simon Lindholm 1a9d5d5a86 resources 2022-06-29 13:19:45 +02:00
Simon Lindholm e6dc3b4ffd Command line parsing 2022-06-29 01:29:26 +02:00
Simon Lindholm 3fd1f6a30c wip 2022-06-28 23:08:23 +02:00
Ash Wolf d1a4fd35a7 first commit 2022-06-13 02:20:18 +02:00