Get some MSDN Device Power API code to compile

The original MSDN code may be found here:
  "Using the Device Power API"
  http://msdn.microsoft.com/en-us/library/windows/desktop/aa373243