hello. jak w temacie
potrzebuje pobrać ścieżkę od uruchomionego procesu, na zasadzie takiej jak np w załączniku
mam funkcję która daje mi tylko nazwy procesów bez ścieżek. ma ktoś jakiś pomysł ?
procedure GetProcesses(var aProcessList: TStringList);
var
Found: boolean;
lSnapShot: cardinal;
rProcess: TProcessEntry32W;
begin
aProcessList.BeginUpdate;
try
aProcessList.Clear;
lSnapShot := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if lSnapShot<>0 then
begin
rProcess.dwSize := SizeOf(rProcess);
Found := Process32First(lSnapShot, rProcess);
while Found do
begin
aProcessList.Add(rProcess.szExeFile);
Found := Process32Next(lSnapShot, rProcess);
end;
CloseHandle(lSnapShot);
end;
finally
aProcessList.EndUpdate;
end;
end;