title: Find system power state using C++
body: <p>I am writing c++ code. I am new to c++. I want to find system power state i.e if its offline/sleep/online etc 
  i am trying to use <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa373227%28v=vs.85%29.aspx" rel="nofollow">SYSTEM_POWER_STATE enumeration</a> . But can't find how to use it if some can write a short example or post a helpful link .</p>
  
  <p>Thanks in advance</p>