AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi All running Processes And Loaded Modudles
Thema durchsuchen
Ansicht
Themen-Optionen

All running Processes And Loaded Modudles

Ein Thema von mohfa · begonnen am 13. Mär 2009 · letzter Beitrag vom 14. Mär 2009
Antwort Antwort
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

All running Processes And Loaded Modudles

  Alt 13. Mär 2009, 17:56
Hi , i want to Enumerate All running Processes and All Loaded Modules( All loaded modules not when i select a Process ID but all Loaded Modules in Memory )


Please see the Attachment


many thanks
Angehängte Grafiken
Dateityp: bmp modules_948.bmp (183,6 KB, 17x aufgerufen)
  Mit Zitat antworten Zitat
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#2

Re: All running Processes And Loaded Modudles

  Alt 14. Mär 2009, 14:12
Hi i did it with this Code :

Delphi-Quellcode:

procedure TForm1.GetProcessListr(var sl: TStrings);
var
  ProcHandle: THandle;
  mh: hmodule;
  procs: array[0..$FFF] of dword;
  count, cm: Cardinal;
  i: integer;
  ModName: array[0..max_path] of char; //??? ??????
begin
  sl.Clear;
  begin
    if not EnumProcesses(@procs, sizeof(procs), count) then
    begin
      exit;
    end;
    for i := 0 to count div 4 - 1 do
    begin
      ProcHandle := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,
        false, procs[i]);
      if ProcHandle > 0 then
      begin
        EnumProcessModules(ProcHandle, @mh, 4, cm);
        GetModuleFileNameEx(ProcHandle, mh, ModName, sizeof(ModName));
        sl.Add(string(ModName));
        CloseHandle(ProcHandle);
      end;
    end;
  end;
end;


procedure TForm1.Button5Click(Sender: TObject);
var
  tmp: TStrings;
begin
  tmp :=listbox1.Items ;
  GetProcessListr(tmp);
end;
So the Result is :
?
\SystemRoot\System32\smss.exe
\??\C:\WINDOWS\system32\csrss.exe
\??\C:\WINDOWS\system32\winlogon.exe
.
.
.

So how to handle the System Processes Paths i mean how to get the Full path to smss.exe


many thanks Again .
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz