title: Is there any Win32 API to trigger the hibernate or suspend mode in Windows?
body: <p>Is there any Win32 API to put the machine into hibernate or suspend mode? </p>
  
  <p>I read MSDN and found that <code>WM_POWERBROADCAST</code> message gets broadcasted when power-management events occur. I thought of simulating the same with <code>PostMessage(WM_POWERBROADCAST)</code>. Is this the correct way of doing or any Win32 API exists to achieve this?</p>