CreateProcess( ) :o)
-
Hi! I have created an Application launcher and I use CreateProcess() to launch my Apps. My problem is that I cannot close my application launcher if my applications are not finished. Is there a way to make the Application launcher and the App independent so that can close my launcher after I have created my Apps? Everything's beautiful if you look at it long enough...
-
Hi! I have created an Application launcher and I use CreateProcess() to launch my Apps. My problem is that I cannot close my application launcher if my applications are not finished. Is there a way to make the Application launcher and the App independent so that can close my launcher after I have created my Apps? Everything's beautiful if you look at it long enough...
-
Hi! I have created an Application launcher and I use CreateProcess() to launch my Apps. My problem is that I cannot close my application launcher if my applications are not finished. Is there a way to make the Application launcher and the App independent so that can close my launcher after I have created my Apps? Everything's beautiful if you look at it long enough...
Instead of using CreateProcess(), maybe you should use ShellExecute to launch your other applications.
CString filepath = "C:\\temp.exe"; HINSTANCE err = ShellExecute(NULL, _T("open"), filepath , NULL, NULL, SW_SHOW);
It should look something like that, but my C++ has been getting a little rusty lately. Hope that helps. Daniel E. Blanchard -
Instead of using CreateProcess(), maybe you should use ShellExecute to launch your other applications.
CString filepath = "C:\\temp.exe"; HINSTANCE err = ShellExecute(NULL, _T("open"), filepath , NULL, NULL, SW_SHOW);
It should look something like that, but my C++ has been getting a little rusty lately. Hope that helps. Daniel E. BlanchardMy mistake, you beat me to it. Daniel E. Blanchard
-
Hi! I have created an Application launcher and I use CreateProcess() to launch my Apps. My problem is that I cannot close my application launcher if my applications are not finished. Is there a way to make the Application launcher and the App independent so that can close my launcher after I have created my Apps? Everything's beautiful if you look at it long enough...
Yes. Try this: // Run specified 32-bit process bLaunched = ::CreateProcess( pszPath, // name of executable module szCommandLine, // program command line NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi ); ShellExecute uses CreateProcess anyway, so you are just missing something or have a bad argument to the function. C++/MFC/InstallShield since 1993