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

Terminate help

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 4 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.
  • E Offline
    E Offline
    eric_tran
    wrote on last edited by
    #1

    GDay everyone, Is there any way to terminate the child process from the parent process in C programming? Please give me an advice. Thanks

    eric

    _ N H 3 Replies Last reply
    0
    • E eric_tran

      GDay everyone, Is there any way to terminate the child process from the parent process in C programming? Please give me an advice. Thanks

      eric

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      eric_tran wrote:

      terminate the child process from the parent process

      TerminateProcess(). Also from MSDN: If you need to have one process terminate another process, the following steps provide a better solution: Have both processes call the RegisterWindowMessage function to create a private message. One process can terminate the other process by broadcasting the private message using the BroadcastSystemMessage function as follows: BroadcastSystemMessage( BSF_IGNORECURRENTTASK, // do not send message to this process BSM_APPLICATIONS, // broadcast only to applications private message, // message registered in previous step wParam, // message-specific value lParam ); // message-specific value The process receiving the private message calls ExitProcess to terminate its execution. See if either helps you...

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • E eric_tran

        GDay everyone, Is there any way to terminate the child process from the parent process in C programming? Please give me an advice. Thanks

        eric

        N Offline
        N Offline
        Naveen
        wrote on last edited by
        #3

        if u create a process using the CreateProcess API, u will get the handle of that process. So when u want to kill that process u call TerminateProcess() with that handle.

        nave

        1 Reply Last reply
        0
        • E eric_tran

          GDay everyone, Is there any way to terminate the child process from the parent process in C programming? Please give me an advice. Thanks

          eric

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          How to create this process?


          WhiteSky


          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