Skip to content

Commit 84bdf44

Browse files
committed
New flag added to CreateToolhelp32Snapshot
1 parent 9964f7f commit 84bdf44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

windows_memory_extractor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct ArgumentManager {
3030
void validateArguments(int argc, char* argv[]) {
3131

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

3636
description.add_options()
@@ -205,7 +205,7 @@ struct MemoryExtractionManager {
205205
MODULEENTRY32 moduleEntry;
206206

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

0 commit comments

Comments
 (0)