Hi everyone, I'm not experienced with processes at all, but what I'm set to to should be really simple. All I do is spawn a process like this:
int spawnId = spawnv(_P_NOWAIT,"wgetlocal.exe",my_env);
Now, what I want to do is kill this program after a certain time. However, the returned spawnId is not what I need when for instance calling taskkill /PID [number] /F
.
I've tried using otherId2 = GetWindowThreadProcessId((HWND)spawnId,OUT otherId1)
but again, neither otherId1
or otherId2
give the correct PID.
If anyone could help me witht his, I'd be vary thankfull. Regards, Roald