Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
Due to the previous commit, the flags bHas32BitExe and bHas64BitDll are
no longer used. Hence, let's remove the code which set them up.
  • Loading branch information
Frerich Raabe committed Aug 21, 2020
1 parent a2bda8f commit 890f1b7
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/creatwth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,6 @@ BOOL WINAPI DetourUpdateProcessWithDll(_In_ HANDLE hProcess,
{
// Find the next memory region that contains a mapped PE image.
//
BOOL bHas64BitDll = FALSE;
BOOL bHas32BitExe = FALSE;
BOOL bIs32BitProcess;
BOOL bIs64BitOS = FALSE;
HMODULE hModule = NULL;
Expand All @@ -528,20 +526,8 @@ BOOL WINAPI DetourUpdateProcessWithDll(_In_ HANDLE hProcess,

if ((inh.FileHeader.Characteristics & IMAGE_FILE_DLL) == 0) {
hModule = hLast;
if (inh.OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC
&& inh.FileHeader.Machine != 0) {

bHas32BitExe = TRUE;
}
DETOUR_TRACE(("%p Found EXE\n", hLast));
}
else {
if (inh.OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC
&& inh.FileHeader.Machine != 0) {

bHas64BitDll = TRUE;
}
}
}

if (hModule == NULL) {
Expand Down

0 comments on commit 890f1b7

Please sign in to comment.