From 8865f9d7bc6b88e6cde2e2ec53e2f7c0f41561a7 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 23 Sep 2015 21:47:56 +0200 Subject: added cmake build script and a few fixes for 64-bit compatibility --- src/shared/inject.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/shared/inject.cpp') 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 -- cgit v1.3.1