summaryrefslogtreecommitdiffhomepage
path: root/src/hook.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hook.c')
-rw-r--r--src/hook.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hook.c b/src/hook.c
index 9a6e885..fe311cc 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -23,6 +23,13 @@
#include "os.h"
#include "x86.h"
+#ifdef _WIN32
+// try to avoid pulling in all of Windows.h for this... (redundant dllimport
+// avoids warnings in hook.test.c where Windows.h is included via test.h)
+__declspec(dllimport) int __stdcall FlushInstructionCache(
+ void *, const void *, usize);
+#endif
+
// Warning: half-arsed hacky implementation (because that's all we really need)
// Almost certainly breaks in some weird cases. Oh well! Most of the time,
// vtable hooking is more reliable, this is only for, uh, emergencies.