summaryrefslogtreecommitdiff
path: root/inject
diff options
context:
space:
mode:
Diffstat (limited to 'inject')
-rw-r--r--inject/injectee.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp
index 89cd6129..bd91f0ad 100644
--- a/inject/injectee.cpp
+++ b/inject/injectee.cpp
@@ -1022,18 +1022,8 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
- if (VERBOSITY > 0) {
- debugPrintf("inject: DLL_PROCESS_ATTACH\n");
- }
-
g_hThisModule = hinstDLL;
- if (VERBOSITY > 0) {
- char szProcess[MAX_PATH];
- GetModuleFileNameA(NULL, szProcess, sizeof szProcess);
- debugPrintf("inject: attached to process %s\n", szProcess);
- }
-
/*
* Calling LoadLibrary inside DllMain is strongly discouraged. But it
* works quite well, provided that the loaded DLL does not require or do
@@ -1067,6 +1057,16 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
}
if (VERBOSITY > 0) {
+ debugPrintf("inject: DLL_PROCESS_ATTACH\n");
+ }
+
+ if (VERBOSITY > 0) {
+ char szProcess[MAX_PATH];
+ GetModuleFileNameA(NULL, szProcess, sizeof szProcess);
+ debugPrintf("inject: attached to process %s\n", szProcess);
+ }
+
+ if (VERBOSITY > 0) {
debugPrintf("inject: loading %s\n", szNewDllName);
}