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

Process Control

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 Posters 0 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.
  • S Offline
    S Offline
    Steve Thresher
    wrote on last edited by
    #1

    I have a program that maintains a list of files. The operator is allowed to open these files which I do by calling ShellExecute(). What I would like to know is how to tell if the program started by ShellExecute() is still running when my program terminates. Is this possible? Thanks for any information you can provide. Steve.

    J T 2 Replies Last reply
    0
    • S Steve Thresher

      I have a program that maintains a list of files. The operator is allowed to open these files which I do by calling ShellExecute(). What I would like to know is how to tell if the program started by ShellExecute() is still running when my program terminates. Is this possible? Thanks for any information you can provide. Steve.

      J Offline
      J Offline
      James Pullicino
      wrote on last edited by
      #2

      Try using ShellExecuteEx instead and collect the hProcess member of the returned SHELLEXECUTEINFO structure. What to do with the hProccess is another story, maybe someone else can help? Alternatevly use CreateProcess, which gives more control. (2b || !2b)

      1 Reply Last reply
      0
      • S Steve Thresher

        I have a program that maintains a list of files. The operator is allowed to open these files which I do by calling ShellExecute(). What I would like to know is how to tell if the program started by ShellExecute() is still running when my program terminates. Is this possible? Thanks for any information you can provide. Steve.

        T Offline
        T Offline
        tanin
        wrote on last edited by
        #3

        Hey. use ShellExecuteEx api and in it's parameter structure check the hProcess data member after u launch your process, it should contain a handle to your process, after that you can do some stuff with the handle ussing api, depending on what you want. :-D

        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