Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. std::deque<MODULEENTRY32> getModuleList()
  2. {
  3.     std::deque<MODULEENTRY32> result;
  4.     auto snap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0);
  5.     MODULEENTRY32 me;
  6.     if (Module32First(snap, &me)){
  7.         do {
  8.             result.push_back(me);
  9.         } while (Module32Next(snap, &me));
  10.     }
  11.     CloseHandle(snap);
  12.     return result;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement