summaryrefslogtreecommitdiff
path: root/inject
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-11-16 14:34:42 +0000
committerJose Fonseca <jfonseca@vmware.com>2015-11-16 15:00:38 +0000
commit482c17d37f18cfd147d8f8a4f2ab780cae2d7aad (patch)
tree113bc53c60fb5e93cf6a537e06a5c2540de39dfa /inject
parent000f6a62fb10c8e533347dfd30db339f84b71f31 (diff)
inject: Use InitializeCriticalSection.
Instead of non-standard static critical section static initializer. Fixes #397.
Diffstat (limited to 'inject')
-rw-r--r--inject/injectee.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp
index 81d7af35..3e694df1 100644
--- a/inject/injectee.cpp
+++ b/inject/injectee.cpp
@@ -58,7 +58,7 @@ static int VERBOSITY = 0;
#define NOOP 0
-static CRITICAL_SECTION Mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0};
+static CRITICAL_SECTION Mutex;
@@ -1037,6 +1037,8 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
+ InitializeCriticalSection(&Mutex);
+
g_hThisModule = hinstDLL;
/*