Commit Graph

32 Commits

Author SHA1 Message Date
Tau 45e2416702 Simplify DLL hook mechanism
This change deletes the GetProcAddress hook and exports symbols
corresponding to the hooked functions from each hook DLL instead;
we stop at redirecting LoadLibrary/GetModuleHandle calls to the
hook DLL. This simplified approach has less hidden magic going on
behind the scenes and is more readily composable (i.e. a hook DLL
can export redirect symbols for more than one dynamically-loaded
DLL).
2021-06-13 11:27:00 -04:00
Tau 1d6b7591ef Fix DLL loader hook logic
Seems this was quite buggy in its original form.
2021-06-13 11:27:00 -04:00
Tau 81f90981b4 Delete draft debris that was never used 2021-06-13 11:27:00 -04:00
85be42b2ce67a8e34b32793360824b056c0c2444 43428a6502 Add support for specifing monitor number for dx9 games 2020-06-06 22:27:07 +02:00
Felix Anderson eef0f74ac0 hooklib/path.c: hook Ex variants of CreateDirectory 2020-05-21 00:58:24 +00:00
Felix Anderson 8607faea7f hooklib/gfx.c: add dynamic DLL hook on d3d9.dll
- Somehow doing `dll_hook_push` on `d3d9.dll` fixes the path hooks for
  Ongeki's `mu3.exe`
2020-05-21 00:58:23 +00:00
Felix Anderson 8bde573bdd hooklib/path.c: add function to hook apply path hooks to another module 2020-05-21 00:58:20 +00:00
Felix Anderson 8108ec2130 platform/vfs.c: allow nthome and option path hooks without ending back-slash
- This actually fixed option loading.

- Ongeki uses forward-slashes for Y:/SDDT/log
2020-05-20 18:09:23 +00:00
888be1df7c6f962725a28a172a5394eec3e228e7 54cd2f6e9a hooklib/path.c: add slash-insensitive path comparison API 2019-12-19 08:31:44 +01:00
888be1df7c6f962725a28a172a5394eec3e228e7 03c7954ada hooklib/path.c: add support for FindFirstFile{A,W} 2019-12-18 20:23:35 +01:00
Will Toohey 4bc7eee909 Allow dns hook to fail a resolve and add domains
This lets people with crap ISPs that resolve domains
that they shouldn't to use the game without
changing their DNS server
2019-11-17 15:08:25 +10:00
5d56ff255b4bb8866101856f9e0def651041e410 f5aa7f4d88 Fix build on msbuild 2019-11-09 15:44:46 -07:00
Tau 8485879ff7 hooklib: Shift config structs around 2019-11-05 19:31:51 -05:00
Tau 06df306c52 Fix some dprintf() message prefixes 2019-11-03 09:44:40 -05:00
Tau 46e5c6127d Fix function pointer calling convention syntax
Fixes MSVC build
2019-11-03 08:36:37 -05:00
Tau b270eaf1c6 hooklib/gfx.c: Add option to frame the d3d window 2019-10-19 17:05:09 -04:00
Tau 7c721aa1f8 hooklib/gfx.c: Wire up gfx config 2019-10-19 17:05:02 -04:00
Tau 871b82a8ad hooklib/config.c: Add struct gfx_config 2019-10-19 17:03:17 -04:00
Tau dfcf3d8bd1 hooklib/spike.c: Add a measure of configurability 2019-10-19 16:15:14 -04:00
Tau e918795445 Make clock hook configurable 2019-10-14 23:18:18 -04:00
Tau 2864d22df2 hooklib/dns.c: Hook classic getaddrinfo() API too 2019-09-07 16:26:10 -04:00
Tau 697c6c6893 hooklib/dns.c: Fix locking 2019-09-07 16:25:44 -04:00
Tau 63729cc95e hooklib/dns.c: Delineate declarations 2019-09-07 16:25:12 -04:00
Tau 3902757427 hooklib/path.c: Hook FindFirstFileEx 2019-09-04 13:47:31 -04:00
Tau 8ecbb860d8 hooklib/dns.c: Add initial WinDNS hook
We'll probably need to intercept the more traditional
gethostbyname() API and friends at some point too.
2019-09-04 13:47:31 -04:00
Tau 05e4dda8e6 Add missing <assert.h> includes
Fixes non-PCH build.
2019-09-01 11:48:14 -04:00
Tau 94005de9e9 hooklib/clock.c: Split clock read and write hooks 2019-08-21 12:54:10 -04:00
Tau 943c4e41c0 hooklib/reg.c: Don't log read accesses
Output volume there is a little much.
2019-05-28 17:13:26 -04:00
Tau 744a7e6560 hooklib/path.c: Add initial path rewriting hooks 2019-05-17 23:07:20 -04:00
Tau 2ab3a353df hooklib/reg.c: Add registry hook mechanism 2019-05-17 23:07:20 -04:00
Tau 96b1981e01 hooklib/dll.c: Add dynamic loader hook mechanism 2019-05-14 17:13:08 -04:00
Tau 1b93551a41 hooklib: Split out of util
This is distinct from capnhook's hooklib, although the intent is
the same. Hopefully these two libraries sharing a name won't get
too confusing...
2019-05-14 17:13:08 -04:00