Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

SYSTEM_POWER_STATUS (Structures)
 
.
Summary
Summary

C# Definition:

public class SYSTEM_POWER_STATUS_EX2
struct SYSTEM_POWER_STATUS
{
    public byte ACLineStatus;
    public byte BatteryFlag;
    public byte BatteryLifePercent;
    public byte Reserved1;
    public int BatteryLifeTime;
    public int BatteryFullLifeTime;
    public byte Reserved2;
    public byte BackupBatteryFlag;
    public byte BackupBatteryLifePercent;
    public byte Reserved3;
    public int BackupBatteryLifeTime;
    public int BackupBatteryFullLifeTime;
    public int BatteryVoltage;
    public int BatteryCurrent;
    public int BatteryAverageCurrent;
    public int BatteryAverageInterval;
    public int BatterymAHourConsumed;
    public int BatteryTemperature;
    public int BackupBatteryVoltage;
    public byte BatteryChemistry;
}

VB Definition:

Public Class SYSTEM_POWER_STATUS_EX2
    Public TODO
End Class

User-Defined Field Types:

public enum ACLineStatus : byte
{
    Offline = 0,
    Online  = 1,
    BackUp  = 2,
    Unknown = 255,
}
   public ACLineStatus _ACLineStatus;
   public BatteryFlag  _BatteryFlag;
   public Byte     _BatteryLifePercent;
   public Byte     _Reserved1;
   public Int32    _BatteryLifeTime;
   public Int32    _BatteryFullLifeTime;
  }

Notes:

None.

or

Documentation

struct SYSTEM_POWER_STATUS
{
    public byte ACLineStatus;
    public byte BatteryFlag;
    public byte BatteryLifePercent;
    public byte Reserved1;            // set to 0
    public int BatteryLifeTime;
    public int BatteryFullLifeTime;
}

VB Definition:

    Structure SYSTEM_POWER_STATUS
    Public ACLineStatus As Byte
    Public BatteryFlag As Byte
    Public BatteryLifePercent As Byte
    Public Reserved1 As Byte
    Public BatteryLifeTime As Integer
    Public BatteryFullLifeTime As Integer
    End Structure

User-Defined Field Types:

None.

Notes:

For information on how to get the SYSTEM_POWER_STATUS struct filled: http://www.pinvoke.net/default.aspx/kernel32/GetSystemPowerStatus.html

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions