Commit Graph
9 Commits
Author SHA1 Message Date
Kevin Trocolli 6b732bfbd6 add io and serial to procaddr table 2023-12-10 18:59:02 -05:00
Kevin Trocolli 888d068d58 allow iohook and serial_hook to land on DLLs loaded after initialization 2023-11-30 02:18:50 -05:00
Matt Bilker f0e5f82028 hook/iohook.c: Fix race condition at during iohook initialization
- If another DLL being loaded spawns a thread that begins doing I/O,
  then there is a race condition where `hook_table_apply` is still
  applying the hooks and has not returned yet but the hooked functions
  are called by those other threads. This causes the assert on
  `iohook_initted` to trigger.

- The easy fix is to always enter the mutex to ensure the hooks have
  been applied and function addresses for `CreateFileW` and
  `SetFilePointerEx` have been resolved.
2021-10-25 11:20:48 -04:00
Decaf Code 69f7e3b48c hook/iohook.c: Add iohook_open_nul_fd()
This provides a replacement for iohook_open_dummy_fd() whose error
handling is more consistent with the rest of this library.
2019-11-03 10:57:33 -05:00
Decaf Code 1b99fb16b8 hook/iohook.c: Remove ioctl asserts
These assertions don't seem to hold for certain real ioctl errors.
2018-11-23 13:58:25 -05:00
Decaf Code bfee3db861 Fix MSVC compatibility issues
Project now builds in Visual Studio 2017, probably earlier versions
too as long as they support enough of C99.
2018-11-23 13:58:25 -05:00
Decaf Code d985965639 Fix non-PCH build 2018-11-23 13:46:49 -05:00
Decaf Code 2f7df12fc8 hook/iohook.c: Fix DeviceIoControl error path 2018-11-20 19:49:38 -05:00
Decaf Code 73c893168c hook/iohook.c: Add Win32 I/O interception mechanism 2018-11-10 11:24:57 -05:00