Is is feasible to get the process Id from windowHandle or even vice versa in Java?
We have the option to get the thread from the windowHandle in Java
User32.INSTANCE.GetWindowThreadProcessId(desktopWindow.getHWND(),null);
but how would be relate this thread to the processId
From GetWindowThreadProcessId
In other words, pass an
IntByReference, and afterwards retrieve its value. For instance (error checking omitted):