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. How To Test Redirected Standard Handles of Another Process

How To Test Redirected Standard Handles of Another Process

Scheduled Pinned Locked Moved C / C++ / MFC
comhelptutorialquestion
1 Posts 1 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.
  • Y Offline
    Y Offline
    yccheok
    wrote on last edited by
    #1

    Based on the article "How to spawn console processes with redirected standard handles" found at http://support.microsoft.com/default.aspx?scid=kb;en-us;190351 I realize that in order to see whether the spawned process is terminated, the author use the returned code from WriteFile. If the WriteFile fail to write at the redirected standard handles of another process and the error code is ERROR_NO_DATA, that's mean the pipe was closed through normal child process termination. However, is there any way to check whether the pipe is still connected to an alived process, without explicitly WriteFile through that pipe. i.e. bool IsPipeStillConnectedToAliveProcess (HANDLE pipeHandle); Thank you very much! cheok

    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