summaryrefslogtreecommitdiff
path: root/inject
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-07-13 12:01:45 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-07-13 15:53:34 +0100
commit42b31cf3248acf7acd1fd30c7491871c50305fa8 (patch)
tree44f0c242937bdf94741a8260efa57ae11ac67992 /inject
parenta316c6e87916853c0e8f31bc73503e469cd77e96 (diff)
inject: Reorder log calls.
So that they are set after VERBOSITY is read.
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);
}