convert this logic into C++:
while the handle is invalid keep looping and call the openhandle function.
Sorry but I am new to C++ and work mainly in VB.net
How can I Code my Console app to wait for my games process to be opened ?
I have tried some do whiles but they failed .
And I have looked for an example but have not found one that is right .
Everything else is working correctly I just can not seem to get that part correct .
Please remember I am very very new to the c language .
And i never really tried to code any project to wait for an .exe i would just have it throw an error message .
Any decent example would be great thank's .
Last edited by HOOSIER; 10-18-2015 at 11:07 AM.
convert this logic into C++:
while the handle is invalid keep looping and call the openhandle function.
That's not the right answer tbh but ok !
I do better with a visual example I would think a do while would work but i have not had any luck . So I searched for some examples to which I could not find any so i turned to this post . And in my opinion a tutorial on just suck a thing should be on here really .
Something like this? (This will look for the window, but looking for the actual process will be pretty much the same)Code://inside your main function HWND tarWnd = NULL; std::cout << "Searching for window: Example name\n"; while(tarWnd == NULL) { tarWnd = FindWindow(NULL, "Example name"); } std::cout << "Window: "Example name" found! Executing program.\n";
Last edited by Septus10; 10-20-2015 at 03:15 PM.