Results 1 to 5 of 5

Thread: [RESOLVED] Determine whether Hibernate is enabled or not

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2014
    Posts
    10

    Resolved [RESOLVED] Determine whether Hibernate is enabled or not

    Hi, I have a simple application. During closing a form will show up and ask what to do: Whether close the application and shutdown (which drops a menu of "shutdown", "restart", "hibernate", "log off", "lock", "standy"), close temporarily (which closes both confirmation and main forms, but it doesn't shutdown) and cancel (which only closes the custom messagebox and cancels the FormClosing event)

    That works as expected.

    I have a little problem, though. Some users disable the Hibernate function to save some space (either by editing the registry or by using a third party software like TuneUp Utilities). I disabled my own Hibernate function to see what would happen if I tried to hibernate it with my application and... bam! Blue Screen of Death! (It also happens if I try to hibernate it the "Windows way" or if the laptop tries to hibernate due to low battery, so it's not anything my program is doing wrong) I've been told that Hibernate is determined by "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\HibernationPreviouslyEnabled", but I can't find that entry on my registry.

    That being explained, I need a way to determine if Hibernate is enabled so I can tell the user they can't select the "Hibernate" menu item due to the function being disabled and avoid the BSOD's or any other bugs.
    Last edited by soulblazer; Jan 2nd, 2015 at 06:10 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width