View Single Post
  #15  
Old 05-18-2004, 18:32
disrupt0r
 
Posts: n/a
Quote:
Originally Posted by loman
hi,
I would like to know how some programs such as LordPE displays dll loaded by an executable, what API are called? thanks in advance
Code:
#include <tlhelp32.h> 

  DWORD currentProcessId = ::GetCurrentProcessId();
  HANDLE h = ::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, currentProcessId); 
  if (h != INVALID_HANDLE_VALUE) 
  {
    MODULEENTRY32 me32 = {0}; 
    me32.dwSize = sizeof MODULEENTRY32; 

    for (BOOL b = ::Module32First(h, &me32); b; b = ::Module32Next(h, &me32))
    { 
       // do something with me32
    }
    ::CloseHandle(h); 
  }
Reply With Quote