المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : TerminateProcess()



C++ Programming
04-01-2009, 03:12 AM
Alright, I'm trying to incorporate TerminateProcess() into my progrms. I have two programs running at the same time, the first program opens the second via system("") and then continues to run a series of GetAsyncKeyState()checks that blocks input when certain keys are pressed. The second program is an annoying little game that runs through a random array of MessageBoxes. The issue I've hit is that when the second program finishes, the first program is still going--which means the BlockInput code is still ready to set off. What I'm trying to do is incorporate TerminateProcess() at the very end of the second program so that right before the second program finishes it closes the first, does anyone know how to do this?