A
Arnaldo Fuziy
With your help, we've got to this function that is returning perfectly the
battery status (just translated from C# function sent by Alex Feinman). Is
there any way that we can see backup battery status (that one in the power
app in control panel)?
'--------------
'Returns battery status
<StructLayout(LayoutKind.Sequential)> _
Public Class SystemPowerStatus
Public ACLineStatus As Byte
Public BatteryFlag As Byte
Public BatteryLifePercent As Byte
Public Reserved1 As Byte
Public BatteryLifeTime As Long
Public BatteryFullLifeTime As Long
Public Reserved2 As Byte
Public BackupBatteryFlag As Byte
Public BackupBatteryLifePercent As Byte
Public Reserved3 As Byte
Public BackupBatteryLifeTime As Long
Public BackupBatteryFullLifeTime As Long
End Class
<DllImport("coredll.dll", EntryPoint:="GetSystemPowerStatusEx",
SetLastError:=True)> _
Public Function GetSystemPowerStatus(ByVal PowerStatus As SystemPowerStatus)
As Boolean
End Function
<DllImport("coredll.dll")> _
Public Function GetLastError() As Long
End Function
battery status (just translated from C# function sent by Alex Feinman). Is
there any way that we can see backup battery status (that one in the power
app in control panel)?
'--------------
'Returns battery status
<StructLayout(LayoutKind.Sequential)> _
Public Class SystemPowerStatus
Public ACLineStatus As Byte
Public BatteryFlag As Byte
Public BatteryLifePercent As Byte
Public Reserved1 As Byte
Public BatteryLifeTime As Long
Public BatteryFullLifeTime As Long
Public Reserved2 As Byte
Public BackupBatteryFlag As Byte
Public BackupBatteryLifePercent As Byte
Public Reserved3 As Byte
Public BackupBatteryLifeTime As Long
Public BackupBatteryFullLifeTime As Long
End Class
<DllImport("coredll.dll", EntryPoint:="GetSystemPowerStatusEx",
SetLastError:=True)> _
Public Function GetSystemPowerStatus(ByVal PowerStatus As SystemPowerStatus)
As Boolean
End Function
<DllImport("coredll.dll")> _
Public Function GetLastError() As Long
End Function