winapi - User's Preferred poweroff action - Windows -


i have program takes long time run , intended run unattended. in windows, best way determine users preferred poweroff action.

  • what power button does.
  • in windows 7, start menu logoff action (which shut down default).

how can determine these values on windows xp, windows vista , windows 7?

is there api this? (i.e. shutdown, suspend, or hibernate according users preferences)

if using managed code, there powergetactivescheme. there example of how use here: http://www.pinvoke.net/default.aspx/powrprof.powergetactivescheme


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -