BUG: Processes.RefreshItems does not find the renamed proces

delphi package - easy access to kernel objects etc.
Post Reply
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

BUG: Processes.RefreshItems does not find the renamed proces

Post by shark »

madKernel does not find the started process after renaming his file.

How to me to find out the given process?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Can you give me some more details, please? What do you mean with "does not find" exactly? Thanks!
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

Post by shark »

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 !!!
......
The second message does not appear!
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does it work if you search for "notepad.exe" in step 2.?
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

Post by shark »

After renaming the madKernel finds the first module used by this process (for example ntdll.dll) instead of the fake.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;
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)
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ok, thanks for testing/reporting. I'll have a look at it.
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

Post by shark »

If not it is inconvenient, have left on a mail box of correction (myAC.support{at}gmail.com).
This correction is very necessary!
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

Post by shark »

to madshi:
And how for a long time to me to wait for correction of this bug?
Support of this function is very urgently necessary for me.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

You expect a bugfix in 24-48 hours during a weekend?

Are you a commercial customer, btw? That would help increasing priority, of course (my to do list is quite full).
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Sorry for the late response. The fix will be uploaded later today. You can download it tomorrow here:

http://madshi.net/madCollectionBeta.exe
shark
Posts: 7
Joined: Fri Apr 28, 2006 9:02 am
Contact:

Post by shark »

Thank! Like all works as it is necessary.
Post Reply