Createprocess()
-
I am trying to open a exe file through my application. I am using CreateProcess() for the same But before the application lauches the next line starts executing. I added Sleep(10000). But that does not help everytime Please suggest how can I wait till application is up and then proceed with other calls.
-
I am trying to open a exe file through my application. I am using CreateProcess() for the same But before the application lauches the next line starts executing. I added Sleep(10000). But that does not help everytime Please suggest how can I wait till application is up and then proceed with other calls.
What does the next line do? What kind of problem does the next line make to be execute? tell a little more about your problem...
-
I am trying to open a exe file through my application. I am using CreateProcess() for the same But before the application lauches the next line starts executing. I added Sleep(10000). But that does not help everytime Please suggest how can I wait till application is up and then proceed with other calls.
Is'nt ShellExeute helping you?
-
What does the next line do? What kind of problem does the next line make to be execute? tell a little more about your problem...
Here when I open a application which is a server, the mounted file systesm should create a corresponding directory.So next line is to Check for the folder in fs. This command executes imeediately and returns no folder.
-
I am trying to open a exe file through my application. I am using CreateProcess() for the same But before the application lauches the next line starts executing. I added Sleep(10000). But that does not help everytime Please suggest how can I wait till application is up and then proceed with other calls.
-
WaitForInputIdle or GetExitCodeProcess
may help?He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
-
I am using below function and its working fine for now. DWORD dwExit = WaitForSingleObject(piProcessInfo.hProcess,5 * 10000); This is incorporating required delay.
I think that's the only way. (up to my knowledge) because GetExitCodes just get the termination status. May be after waiting , you can check for STILL_ACTIVE status. But your design sounds little bad. What is that you are trying to do? May be you could synchronize your processes with kernel objects like Events. That would be a better solution.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus