summaryrefslogtreecommitdiff
path: root/src/shared/inject.cpp
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2015-09-23 21:47:56 +0200
committerTannin <sherb@gmx.net>2015-09-23 21:47:56 +0200
commit8865f9d7bc6b88e6cde2e2ec53e2f7c0f41561a7 (patch)
treecc17c65e380796a59860fd52d0b7297fd56fd23e /src/shared/inject.cpp
parentae82ab7dca062ab65983e01c6ea49843563ae898 (diff)
added cmake build script and a few fixes for 64-bit compatibility
Diffstat (limited to 'src/shared/inject.cpp')
-rw-r--r--src/shared/inject.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/inject.cpp b/src/shared/inject.cpp
index 36db7840..fcd4cfab 100644
--- a/src/shared/inject.cpp
+++ b/src/shared/inject.cpp
@@ -113,6 +113,8 @@ void injectDLL(HANDLE processHandle, HANDLE threadHandle, const std::string &dll
// dizzy yet? we still have to calculate the entry point as an address relative to our stub
ULONG entryPoint = 0;
+ // not implemented on 64 bit systems
+#ifdef _X86_
CONTEXT threadContext;
threadContext.ContextFlags = CONTEXT_CONTROL;
if (::GetThreadContext(threadHandle, &threadContext) == 0) {
@@ -139,6 +141,7 @@ void injectDLL(HANDLE processHandle, HANDLE threadHandle, const std::string &dll
if (::SetThreadContext(threadHandle, &threadContext) == 0) {
throw windows_error("failed to overwrite thread context");
}
+#endif
}
} // namespace MOShared