I have a laptop.
I use WinXP.
If my laptop battery almost empty, there will be a notification "Low battery" on the taskbar.
I had searched a code in this forum about how to do it. But I found nothing.
So the problem is: how to get ampere/volt/vendor of battery installed in my laptop with MASM code?
Would you like to give me a clue?
Thank you.
Make program with MASM is very interesting. :U
It depends on your hardware as to how much information you will get.... As far as I remember some laptops will *only* tell you when you have a few percentage points left....
GetSystemPowerStatus (http://msdn.microsoft.com/en-us/library/aa372693(v=vs.85).aspx)
thanks for quick reply!
this link will help solve my problem
http://www.asmcommunity.net/board/index.php?topic=29838.0
i want to learn it first!
many thanks for the information oex!
ok this is the solution
invoke GetSystemPowerStatus,ADDR SPS
.if SPS.BatteryLifeTime == -1
invoke MessageBox,hWin,SADD("Batery almost empty. Prepare to shutdown"),SADD("info"),0
.else
invoke MessageBox,hWin,SADD("Batery not empty"),SADD("info"),0
.endif
:cheekygreen: :dance:
:cheekygreen: