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. Database & SysAdmin
  3. System Admin
  4. Close applications

Close applications

Scheduled Pinned Locked Moved System Admin
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.
  • A Offline
    A Offline
    ArmandoN
    wrote on last edited by
    #1

    I need to close the system from my application, but before I wanted to send a message to the other processes so that they close. With shutdown no problem, but I don't know as sending the message to the processes. I proved with PostMessage(HWND_BROADCAST, WM_QUERYENDSESSION, 0, 0), but it didn't work. Would somebody be able to help me ? Thank in advance.

    M F 2 Replies Last reply
    0
    • A ArmandoN

      I need to close the system from my application, but before I wanted to send a message to the other processes so that they close. With shutdown no problem, but I don't know as sending the message to the processes. I proved with PostMessage(HWND_BROADCAST, WM_QUERYENDSESSION, 0, 0), but it didn't work. Would somebody be able to help me ? Thank in advance.

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      There's no need to do this. ExitWindowsEx will close any other applications running. Stability. What an interesting concept. -- Chris Maunder

      A 1 Reply Last reply
      0
      • A ArmandoN

        I need to close the system from my application, but before I wanted to send a message to the other processes so that they close. With shutdown no problem, but I don't know as sending the message to the processes. I proved with PostMessage(HWND_BROADCAST, WM_QUERYENDSESSION, 0, 0), but it didn't work. Would somebody be able to help me ? Thank in advance.

        F Offline
        F Offline
        faroqtam
        wrote on last edited by
        #3

        Hi u can close the system abnormaly by closing the Winlogon process . when this process close the system will be halted and the system restarted. On Earth nothing impossible, while your mind running. Faroqtam

        1 Reply Last reply
        0
        • M Mike Dimmick

          There's no need to do this. ExitWindowsEx will close any other applications running. Stability. What an interesting concept. -- Chris Maunder

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

          Hi Mike & Faroqtam, I need to give to all the other applications an opportunity so that they close about 20 seconds previous to the shutdown. My problem is as notifying to the other applications. Thank you for your answers.

          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