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. what will happen when i terminate a process?

what will happen when i terminate a process?

Scheduled Pinned Locked Moved C / C++ / MFC
question
8 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.
  • I Offline
    I Offline
    iceman8616
    wrote on last edited by
    #1

    hi everybody, what will happen when i terminate a prcocess on the windows taskmanager? Can the process make some action before killed?

    L N S 4 Replies Last reply
    0
    • I iceman8616

      hi everybody, what will happen when i terminate a prcocess on the windows taskmanager? Can the process make some action before killed?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi iceman, Do you have a C/C++ related question? I fail to see how your question applies to the board topic. Best Wishes, -David Delaune

      1 Reply Last reply
      0
      • I iceman8616

        hi everybody, what will happen when i terminate a prcocess on the windows taskmanager? Can the process make some action before killed?

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

        iceman8616 wrote:

        Can the process make some action before killed?

        No. The process will not get any clue when it is terminated from the taskmanager.

        nave [OpenedFileFinder] [My Blog]

        L 1 Reply Last reply
        0
        • N Naveen

          iceman8616 wrote:

          Can the process make some action before killed?

          No. The process will not get any clue when it is terminated from the taskmanager.

          nave [OpenedFileFinder] [My Blog]

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Naveen wrote:

          No. The process will not get any clue when it is terminated from the taskmanager.

          Hi Naveen, Are you sure about that? The task manager uses two methods of terminating an application depending on which tab is selected. One of them can be ignored by an application. Best Wishes, -David Delaune

          N 1 Reply Last reply
          0
          • L Lost User

            Naveen wrote:

            No. The process will not get any clue when it is terminated from the taskmanager.

            Hi Naveen, Are you sure about that? The task manager uses two methods of terminating an application depending on which tab is selected. One of them can be ignored by an application. Best Wishes, -David Delaune

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

            Randor wrote:

            task manager uses two methods of terminating an application depending on which tab is selected.

            Hi David, I mean the "EndProcess" option in the "Process" tab of the task manager( I guess it uses TerminateProcess()). It is the "End task" option in the "Application" tab that can be igonred( which sends a WM_CLOSE message ). right? Please correct me if I am wrong.

            nave [OpenedFileFinder] [My Blog]

            L 1 Reply Last reply
            0
            • N Naveen

              Randor wrote:

              task manager uses two methods of terminating an application depending on which tab is selected.

              Hi David, I mean the "EndProcess" option in the "Process" tab of the task manager( I guess it uses TerminateProcess()). It is the "End task" option in the "Application" tab that can be igonred( which sends a WM_CLOSE message ). right? Please correct me if I am wrong.

              nave [OpenedFileFinder] [My Blog]

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Yes, the 'End Task' button on the 'Application' tab simply sends a WM_CLOSE message. You can see this with the Spy++ utility. An application or malware could potentially ignore this message. Best Wishes, -David Delaune

              1 Reply Last reply
              0
              • I iceman8616

                hi everybody, what will happen when i terminate a prcocess on the windows taskmanager? Can the process make some action before killed?

                S Offline
                S Offline
                Stuart Dootson
                wrote on last edited by
                #7

                I believe so - I think the window gets a WM_CLOSE or WM_QUIT first (can't remember which) and if it doesn't die pretty quickly, it then gets terminated with TerminateProcess. I think that's how it works, anyway.

                Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                1 Reply Last reply
                0
                • I iceman8616

                  hi everybody, what will happen when i terminate a prcocess on the windows taskmanager? Can the process make some action before killed?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Simply see the Taskmgr.exe source code (C, Win32 group[^])

                  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