obs-studio/plugins/win-capture
jp9000 a6aa2f9204 win-capture: Add 64bit bounce to func_hook
When hooking 64bit functions, sometimes the offset between the function
being hooked and the hook itself can be large enough to where it
requires a 64bit offset to be used.  However, because a 64bit jump
requires overwriting so many code instructions in the function, it can
sometimes overwrite code in to an adjacent function, thereby causing a
crash.

The 64bit hook bounce (created by R1CH) is designed to prevent using
very long jumps in the target by creating executable memory within a
32bit offset of that target, and then writing it with the 64bit long
jump instruction instead.  Then in the target function, it will jump to
that memory instead, thus forcing the actual hooked function to use a
32bit hook instead of a 64bit hook, and using at most 5 bytes for the
actual hook, preventing any likelihood of it overwriting an adjacent
function.
2015-07-03 12:17:25 -07:00
..
d3d8-api Use _MSC_VER for MSVC-specific pragmas 2015-02-09 03:49:18 -08:00
data/locale Add latest translations from CrowdIn 2015-05-08 17:10:39 -04:00
get-graphics-offsets win-capture: Use inline define with VC only 2015-02-09 03:55:17 -08:00
graphics-hook win-capture: Fix hook bug that could cause crashes 2015-02-14 09:12:24 -08:00
inject-helper Remove various unused variables 2015-02-09 03:49:13 -08:00
CMakeLists.txt win-capture: fix link libs for mingw-w64 2015-02-09 03:41:53 -08:00
cursor-capture.c Make capture sources w/o alpha use opaque effect 2015-03-22 19:18:05 -07:00
cursor-capture.h win-capture: Don't draw cursor if outside area 2015-01-03 02:37:18 -08:00
dc-capture.c (API Change) Remove pointers from all typedefs 2014-09-25 21:48:11 -07:00
dc-capture.h (API Change) Remove pointers from all typedefs 2014-09-25 21:48:11 -07:00
duplicator-monitor-capture.c Make capture sources w/o alpha use opaque effect 2015-03-22 19:18:05 -07:00
funchook.c win-capture: Add 64bit bounce to func_hook 2015-07-03 12:17:25 -07:00
funchook.h win-capture: Add 64bit bounce to func_hook 2015-07-03 12:17:25 -07:00
game-capture.c win-capture: Modify 16bit to 32bit color conversion to use SSE 2015-06-04 22:23:50 +02:00
graphics-hook-info.h Fix windows printf format warnings (from mingw) 2015-02-09 03:49:14 -08:00
hook-helpers.h Fix windows printf format warnings (from mingw) 2015-02-09 03:49:14 -08:00
load-graphics-offsets.c win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
monitor-capture.c Make capture sources w/o alpha use opaque effect 2015-03-22 19:18:05 -07:00
obfuscate.c Use _MSC_VER for MSVC-specific pragmas 2015-02-09 03:49:18 -08:00
obfuscate.h win-capture: Add obfuscation functions 2014-12-08 01:53:51 -08:00
plugin-main.c win-capture: Add win8+ monitor capture 2015-01-03 02:37:18 -08:00
window-capture.c win-capture: Fix compatibility bug for window cap. 2015-05-01 02:07:19 -07:00
window-helpers.c win-dshow: Remove unnecessarily inline define 2015-02-09 03:55:31 -08:00
window-helpers.h win-capture: Expose get_window_exe as extern 2014-12-08 01:53:53 -08:00