Skip to content

Commit

Permalink
New flag added to CreateToolhelp32Snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofdez26 committed May 4, 2021
1 parent 9964f7f commit 84bdf44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions windows_memory_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct ArgumentManager {
void validateArguments(int argc, char* argv[]) {

namespace po = boost::program_options;
std::string version = "v1.0.0";
std::string version = "v1.0.1";
po::options_description description("Windows memory extractor " + version + "\nUsage");

description.add_options()
Expand Down Expand Up @@ -205,7 +205,7 @@ struct MemoryExtractionManager {
MODULEENTRY32 moduleEntry;

// Get a snapshot of all the modules
snapshotHandle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, argumentManager.getPid());
snapshotHandle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, argumentManager.getPid());
if (snapshotHandle == INVALID_HANDLE_VALUE) {
throw std::exception{ "The modules of the specified process could not be retrieved" };
}
Expand Down

0 comments on commit 84bdf44

Please sign in to comment.