I'm trying to close a FiveWin application (caption = 6.0) from another but it's not working.
TerminateProcess( GetWndTask( FindWindow ( , "6.0" ) ), 1 )
OR
hWnd := FindWindow(, "6.0" ) <--- this gets the correct window handle
hTask := GetWndTask( hWnd ) <--- this fails, getting the wrong number
Isn't GetWndTask( hWnd) supposed to get the process id ?
TerminateProcess( hTask , 1 ) <--- this fails because of the wrong hTask
Any clues ?