Hi there, i have to admit that i dont understand everthing yet, especially the "NtQueryInformationFile" call.
If you want to iterate files and folders i could give you a way shorter method.
I want that when next file is verified and be the same(s) previous process(es) using this file, not show yours exe name.
My last attempt:
Delphi-Quellcode:
var
currPid, oldPid : LongWord;
// Global
...
for I := 0
to High(P.ProcessIdList)
do
begin
if P.ProcessIdList[I] =
pe.th32ProcessID
then
begin
oldPid := currPid;
currPid :=
pe.th32ProcessID;
if currPid <> oldPid
then
Form1.mmo1.Lines.Add(
pe.szExeFile);
Break;
end;
end;