|
-
Apr 25th, 2002, 10:32 AM
#1
Thread Starter
Frenzied Member
Why will this batterystatus API work in winxp, but not in nt4.0?
Code:
Type SYSTEM_POWER_STATUS
ACLineStatus As Byte
BatteryFlag As Byte
BatteryLifePercent As Byte
Reserved1 As Byte
BatteryLifeTime As Long
BatteryFullLifeTime As Long
End Type
Declare Function GetSystemPowerStatus Lib "kernel32.dll" (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long
Dim SysPower As SYSTEM_POWER_STATUS
GetSystemPowerStatus SysPower
With this code, SysPower.BatteryLifePercent returns 0 in nt 4.0.. but it works properly in winxp..
anyone know how i can get this to work with nt 4.0?
It also works in 9x..
-
Apr 25th, 2002, 10:37 AM
#2
-
Apr 26th, 2002, 11:43 AM
#3
Thread Starter
Frenzied Member
anyone know why its not working in nt 4?
-
Apr 26th, 2002, 04:59 PM
#4
Because it is not supported in NT. The API only works on Win2k/XP or Win95/98/ME.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|