ProcessName to WindowsHandles

delphi package - easy access to kernel objects etc.
Post Reply
arcanjo_junior
Posts: 46
Joined: Sun Oct 09, 2005 1:06 am

ProcessName to WindowsHandles

Post by arcanjo_junior »

Hi,
I don't skow if possible, but .... I want the windows handle for each process with same name.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Can you give me some more details about what you want? I'm not sure I understand you right. What do you mean with "each process with same name". Same name compared to what? To the windows name?

:confused:

Btw, each process can have zero, one or multiple windows. There's nothing like "the windows handle".
arcanjo_junior
Posts: 46
Joined: Sun Oct 09, 2005 1:06 am

Post by arcanjo_junior »

OK, I will give a example:
Imagine you have open 3 times the same program, like explorer.exe (Windows Explorer).
Each program have diferents PID but same name.
I would like take a handles for this opened process.

Thanks.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

What kind of handles? Window handles? Process handles? If Window handles, then all window handles of each process or what?
arcanjo_junior
Posts: 46
Joined: Sun Oct 09, 2005 1:06 am

Post by arcanjo_junior »

I only need a WINDOWS HANDLE.


Thanks
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

As I said, a process can have zero, one or multiple window handles.

Code: Select all

with Processes('some.exe') do
  for i1 := 0 to ItemCount - 1 do
    ShowMessage(IntToStr(Items[i1].Windows_.ItemCount));
Post Reply