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. 2. Questions about PowerDown and Hibernation - need help

2. Questions about PowerDown and Hibernation - need help

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelpquestion
5 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.
  • T Offline
    T Offline
    tibiz
    wrote on last edited by
    #1

    I need to catch Windows PowerDown from a process and block it. This is nicely implemented in MS Outlook 2002 or later (try to power down your computer when MS Outlook is running) 1. How can I catch a Windows PowerDown (or Hibernation) Event without using window (HWND) message queue 2. A way to block or deactivate the PowerDown Any help will realy help, thank you

    S 1 Reply Last reply
    0
    • T tibiz

      I need to catch Windows PowerDown from a process and block it. This is nicely implemented in MS Outlook 2002 or later (try to power down your computer when MS Outlook is running) 1. How can I catch a Windows PowerDown (or Hibernation) Event without using window (HWND) message queue 2. A way to block or deactivate the PowerDown Any help will realy help, thank you

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      What's the problem with using a window? It need not be visible.

      Steve

      T 1 Reply Last reply
      0
      • S Stephen Hewitt

        What's the problem with using a window? It need not be visible.

        Steve

        T Offline
        T Offline
        tibiz
        wrote on last edited by
        #3

        we can't use visible HWND window in our app, and invisible window don't behave well

        S 1 Reply Last reply
        0
        • T tibiz

          we can't use visible HWND window in our app, and invisible window don't behave well

          S Offline
          S Offline
          Stephen Hewitt
          wrote on last edited by
          #4

          Invisible window work just fine. Windows use the technique itself, for example COM uses invisible windows in some circumstances. Later versions of Windows also have message-only windows.

          Steve

          T 1 Reply Last reply
          0
          • S Stephen Hewitt

            Invisible window work just fine. Windows use the technique itself, for example COM uses invisible windows in some circumstances. Later versions of Windows also have message-only windows.

            Steve

            T Offline
            T Offline
            tibiz
            wrote on last edited by
            #5

            I tried the way using creating classic HWND window receiving WM_POWERBROADCAST and returning BROADCAST_QUERY_DENY. Problem is - if I create the window and let it invisible, it don't receive any WM_POWEBROADCAST message.

            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