I am going to open game process from my trainer app and write some values to memory. I have no problems with opening a process and writing a value to memory. But I can't realize how to monitor the game process availability. For example I opened a running process, user closed it and opened again. How can I track this in my code? OpenProcess handle is valid even after the process is closed (until CloseHandle called). Thank you.
A:
Or else, if it's more suitable for your application to have the process termination event signalled to you (process is a waitable object):
::WaitForSingleObject(hProcess, dwTimeout);
Nikola Gedelovski
2010-09-06 08:21:05