summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/inject.cpp3
-rw-r--r--src/shared/stackdata.cpp4
2 files changed, 6 insertions, 1 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
diff --git a/src/shared/stackdata.cpp b/src/shared/stackdata.cpp
index 4450756d..6c5a0968 100644
--- a/src/shared/stackdata.cpp
+++ b/src/shared/stackdata.cpp
@@ -11,7 +11,7 @@
using namespace MOShared;
-#ifdef _MSC_VER
+#if defined _MSC_VER
static void initDbgIfNecess()
{
@@ -94,6 +94,7 @@ void StackData::load_modules(HANDLE process, DWORD processID) {
#pragma warning( disable : 4748 )
void StackData::initTrace() {
+#ifdef _X86_
load_modules(::GetCurrentProcess(), ::GetCurrentProcessId());
CONTEXT context;
std::memset(&context, 0, sizeof(CONTEXT));
@@ -134,6 +135,7 @@ void StackData::initTrace() {
m_Stack[m_Count++] = reinterpret_cast<void *>(stackFrame.AddrPC.Offset);
}
+#endif
}