我根本没有流程经验,但我设置的应该非常简单。我所做的就是产生一个这样的过程:
int spawnId = spawnv(_P_NOWAIT,"wgetlocal.exe",my_env);
现在,我想做的是在一段时间后杀死这个程序。但是,返回的 spawnId 并不是我在调用taskkill /PID [number] /F
.
我已经尝试过使用otherId2 = GetWindowThreadProcessId((HWND)spawnId,OUT otherId1)
但又一次,既没有也没有otherId1
给出otherId2
正确的 PID。
如果有人可以帮助我解决他的问题,我将不胜感激。问候, 罗尔德