Skip to content

Commit

Permalink
Also enumerated 32bit process's DLLs from a 64bit NPFInstall.exe.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Dec 3, 2016
1 parent 5305e73 commit c44630b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packetWin7/NPFInstall/NPFInstall/ProcessUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ BOOL enumDLLs(tstring strProcessName, DWORD dwProcessID)
return FALSE;
}

if (EnumProcessModules(hProcess, hArrModules, sizeof(hArrModules), &cbNeeded))
if (EnumProcessModulesEx(hProcess, hArrModules, sizeof(hArrModules), &cbNeeded, LIST_MODULES_ALL))
{
for (DWORD i = 0; i < cbNeeded / sizeof(HMODULE); i ++)
{
Expand All @@ -98,6 +98,7 @@ BOOL enumDLLs(tstring strProcessName, DWORD dwProcessID)
tstring strModulePathName = szModName;
transform(strModulePathName.begin(), strModulePathName.end(), strModulePathName.begin(), ::tolower);

// transform(strProcessName.begin(), strProcessName.end(), strProcessName.begin(), ::tolower);
// if (strProcessName != _T("nmap.exe"))
// continue;

Expand All @@ -117,7 +118,7 @@ BOOL enumDLLs(tstring strProcessName, DWORD dwProcessID)
}
else
{
TRACE_PRINT1("EnumProcessModules: error, errCode = 0x%08x.", GetLastError());
TRACE_PRINT1("EnumProcessModulesEx: error, errCode = 0x%08x.", GetLastError());
return FALSE;
}

Expand Down

0 comments on commit c44630b

Please sign in to comment.