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. Problem with killing a process

Problem with killing a process

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 2 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.
  • Z Offline
    Z Offline
    zakarias
    wrote on last edited by
    #1

    Please help!! When I stop my application (appl1.exe), the process appl1.exe is not killed. Bellow is the loop that causes this problem. for(;;){ Sleep(100);//pour alléger le CPU DoEvents(); if (Playing==FALSE) { Playing=TRUE; break; } //end if }// end for where: void DoEvents(void) { MSG msg; while(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } Thank you very much in advance. Zakaria azakaria_2000@voila.fr

    M 1 Reply Last reply
    0
    • Z zakarias

      Please help!! When I stop my application (appl1.exe), the process appl1.exe is not killed. Bellow is the loop that causes this problem. for(;;){ Sleep(100);//pour alléger le CPU DoEvents(); if (Playing==FALSE) { Playing=TRUE; break; } //end if }// end for where: void DoEvents(void) { MSG msg; while(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } Thank you very much in advance. Zakaria azakaria_2000@voila.fr

      M Offline
      M Offline
      Martyn Pearson
      wrote on last edited by
      #2

      Have you initialised and set Playing correctly? If it isn't set to FALSE, then the for loop will never break.

      Z 1 Reply Last reply
      0
      • M Martyn Pearson

        Have you initialised and set Playing correctly? If it isn't set to FALSE, then the for loop will never break.

        Z Offline
        Z Offline
        zakarias
        wrote on last edited by
        #3

        Thanks a lot!! You are right!!

        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