BUG: Processes.RefreshItems does not find the renamed proces
BUG: Processes.RefreshItems does not find the renamed proces
madKernel does not find the started process after renaming his file.
How to me to find out the given process?
How to me to find out the given process?
Code: Select all
....
RenameFile('c:\windows\notepad.exe', 'c:\windows\fake.dll');
ExecuteFile('c:\windows\fake.dll', '', 'c:\windows', SW_SHOWNORMAL);
Processes.RefreshItems;
if Processes('fake.dll').ItemCount > 0 then ShowMessage('1: Find process (fake.dll)'); // find process
Sleep(500);
RenameFile('c:\windows\fake.dll', 'c:\windows\notepad.exe');
Processes.RefreshItems;
if Processes('fake.dll').ItemCount > 0 then ShowMessage('2: Find process (fake.dll)'); // NOT FIND Process !!!
......
After renaming the madKernel finds the first module used by this process (for example ntdll.dll) instead of the fake.dll !!!
1) Start notepad.exe
2) Press ButtonUpdate (madKernel finds the notepad.exe)
3) Rename the notepad.exe into fake.dll
4) Press ButtonUpdate (madKernnel does not find notepad.exe, but finds, for example, ntdll.dll)
Code: Select all
procedure TMainForm.ButtonUpdateClick(Sender: TObject);
var
i, n: Integer;
begin
Processes.RefreshItems;
ProcessesList.ClearRows;
n := Processes.ItemCount;
ProcessesList.AddRow(n);
for i:=0 to n-1 do begin
ProcessesList.Cell[1,i].AsString := ExtractFileName(Processes.Items[i].ExeFile);
ProcessesList.Cell[2,i].AsString := ExtractFilePath(Processes.Items[i].ExeFile);
ProcessesList.Cell[3,i].AsString := GetFileVersionStr(Processes.Items[i].ExeFile);
end;
end;
2) Press ButtonUpdate (madKernel finds the notepad.exe)
3) Rename the notepad.exe into fake.dll
4) Press ButtonUpdate (madKernnel does not find notepad.exe, but finds, for example, ntdll.dll)
Sorry for the late response. The fix will be uploaded later today. You can download it tomorrow here:
http://madshi.net/madCollectionBeta.exe
http://madshi.net/madCollectionBeta.exe