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?
Btw, each process can have zero, one or multiple windows. There's nothing like "the windows handle".
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.