How do I open a process and obtain a handle too it in C++. I know that there is system() and numerous methods to obtain a handle, but I’m sure there is a neater/alternative way to doing this. Or is system() the only way to open a .exe from inside your own?
How do I open a process and obtain a handle too it in C++.
Share
A common way to do this is to use the Win32 API
CreateProcess. The last parameter of this function is an out parameter to a structure (PROCESS_INFORMATION) containing the handle to the process (HANDLE hProcess).