how can I get a Process object by a certain ProcessId in Java.
I am using JNA to create a process, because I want to open a application in the background.
WinBase.STARTUPINFO startupInfo = new WinBase.STARTUPINFO();
startupInfo.dwFlags = 1;
WinBase.PROCESS_INFORMATION.ByReference processInformation = new WinBase.PROCESS_INFORMATION.ByReference();
Kernel32.INSTANCE.CreateProcess(null, "C:\\Program Files\\...", null, null, true, new WinDef.DWORD(0), Pointer.NULL, System.getProperty("java.io.tmpdir"), startupInfo, processInformation);
int prozessId = processInformation.dwProcessId.intValue();