Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CreateProcess( ) :o)

CreateProcess( ) :o)

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MemLeak
    wrote on last edited by
    #1

    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...

    M D B 3 Replies Last reply
    0
    • M MemLeak

      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...

      M Offline
      M Offline
      MemLeak
      wrote on last edited by
      #2

      I founded! Just use ShellExecute( NULL, "open", m_Process, NULL, m_Path, SW_SHOWNORMAL ); Everything's beautiful if you look at it long enough...

      1 Reply Last reply
      0
      • M MemLeak

        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...

        D Offline
        D Offline
        Danny Blanchard
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • D Danny 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. Blanchard

          D Offline
          D Offline
          Danny Blanchard
          wrote on last edited by
          #4

          My mistake, you beat me to it. Daniel E. Blanchard

          1 Reply Last reply
          0
          • M MemLeak

            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...

            B Offline
            B Offline
            Blake Miller
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups