Coding Help

How do I recursive scan for a game/client before it is initialized, and then when the process is initially created, how do I capture and store the PID?
1
2
3
4
5
6
7
8
9
10
11
int main()
{
   HWND WindowHandel = FindWindowA(0, "Calculator");

    DWORD proccesID = 0;
   
 GetWindowThreadProcessId(WindowHandel, &proccesID);


    std::cout << proccesID << std::endl;
}

I think this is how you get the PID. Can someone tell me if I'm correct or not?
Last edited on
Topic archived. No new replies allowed.