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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Exiting process

Exiting process

Scheduled Pinned Locked Moved C / C++ / MFC
questionperformancehelp
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.
  • K Offline
    K Offline
    koumodaki
    wrote on last edited by
    #1

    I have a application that does some computations based on inputs from user, prints the results of the calcutaions in a file and exits. I am using ExitProcess() for exiting from the application. But while closing the application I get a error "The instruction at "0x73e6827a" referenced at "0x00157479c". The memory could not be read" . When I use TerminateProcess() I dont get the error message eventhough TerminateProcess() is not a recommeneded method for exiting process. Why does this happen?

    H M A 3 Replies Last reply
    0
    • K koumodaki

      I have a application that does some computations based on inputs from user, prints the results of the calcutaions in a file and exits. I am using ExitProcess() for exiting from the application. But while closing the application I get a error "The instruction at "0x73e6827a" referenced at "0x00157479c". The memory could not be read" . When I use TerminateProcess() I dont get the error message eventhough TerminateProcess() is not a recommeneded method for exiting process. Why does this happen?

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

      What happens if you send WM_CLOSE to that program?

      1 Reply Last reply
      0
      • K koumodaki

        I have a application that does some computations based on inputs from user, prints the results of the calcutaions in a file and exits. I am using ExitProcess() for exiting from the application. But while closing the application I get a error "The instruction at "0x73e6827a" referenced at "0x00157479c". The memory could not be read" . When I use TerminateProcess() I dont get the error message eventhough TerminateProcess() is not a recommeneded method for exiting process. Why does this happen?

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        Is it a console app or a GUI app? You shouldn't have to call ExitProcess and definitely shouldn't have to use TerminateProcess. Some info: Terminating a Process[^]

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        1 Reply Last reply
        0
        • K koumodaki

          I have a application that does some computations based on inputs from user, prints the results of the calcutaions in a file and exits. I am using ExitProcess() for exiting from the application. But while closing the application I get a error "The instruction at "0x73e6827a" referenced at "0x00157479c". The memory could not be read" . When I use TerminateProcess() I dont get the error message eventhough TerminateProcess() is not a recommeneded method for exiting process. Why does this happen?

          A Offline
          A Offline
          aks
          wrote on last edited by
          #4

          The difference b/w ExitProcess and TerminateProcess is ExitProcess will send DETACH message to all the loaded dll where TerminateProcess won't. So the error may occured on unloading some dll loaded by ur application.

          AJay

          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