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. Notification on Hibernate?

Notification on Hibernate?

Scheduled Pinned Locked Moved C / C++ / MFC
javaquestion
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.
  • D Offline
    D Offline
    Dominik Reichl
    wrote on last edited by
    #1

    Hello! Is there any way to get a notification when Windows enters the hibernate state? Is a windows message sent, or can one register a callback? I've found the WM_POWERBROADCAST message, however it seems that you can only detect the standby modus with it, not hibernation. Best regards Dominik


    Too many passwords to remember? Try KeePass Password Safe!

    M 1 Reply Last reply
    0
    • D Dominik Reichl

      Hello! Is there any way to get a notification when Windows enters the hibernate state? Is a windows message sent, or can one register a callback? I've found the WM_POWERBROADCAST message, however it seems that you can only detect the standby modus with it, not hibernation. Best regards Dominik


      Too many passwords to remember? Try KeePass Password Safe!

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

      The PBT_APMSUSPEND event (in a WM_POWERBROADCAST message) doesn't indicate the system is entering hibernate state? Mark

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

      D 1 Reply Last reply
      0
      • M Mark Salsbery

        The PBT_APMSUSPEND event (in a WM_POWERBROADCAST message) doesn't indicate the system is entering hibernate state? Mark

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

        D Offline
        D Offline
        Dominik Reichl
        wrote on last edited by
        #3

        It seems Windows does not send PBT_APMSUSPEND nor PBT_APMQUERYSUSPEND (in WM_POWERBROADCAST) when going to sleep. I've found some other power functions in the meanwhile (CallNtPowerInformation, GetActivePwrScheme, ...), maybe one of these helps... Thanks anyway for your reply, best regards Dominik


        Too many passwords to remember? Try KeePass Password Safe!

        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