2 Commits
Author SHA1 Message Date
kyoubate-haruka afece371fb Make inject return the injected program's exit code (#8)
This adds that if a process has ran successfully with inject, the exit code from the child process is returned, instead of always success.

Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/capnhook/pulls/8
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
2026-07-16 10:37:49 +00:00
kyoubate-haruka a3443a8b5b Add iohook for GetFileType (#7)
Unity (or mono in that case) is a bit special when it comes to handling file I/O, as before any operation (read, write) it will do a call to `GetFileType` to determine how to set the parameters for the following winapi calls. Handles that we replace with `iohook_open_nul_fd` however don't return the expected `FILE_TYPE_DISK`, as a null handle is a `FILE_TYPE_CHAR` which works by chance for serial ports, but not for files:

Related: https://gitea.tendokyu.moe/TeamTofuShop/segatools/issues/116
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/capnhook/pulls/7
Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
2026-07-05 15:33:19 +00:00