This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Program to check power source (Batt. or A/C) of a laptop


Program to check power source (Batt. or A/C) of a laptop

Postby James S » Nov 13, 2005 @ 1:20am

James S
pm Insider
 
Posts: 17064
Joined: Jan 12, 2002 @ 2:33pm
Location: Lexington, KY


Postby Dan East » Nov 14, 2005 @ 3:13pm

I don't know how to produce .com (and it seems that info is hard to find now, having to weed through all the COM documentation), so here's an EXE.

The return codes are as follows:
0 to 100: On AC Power, n is the battery percentage remaining
-100 to -1: On DC Power, abs(n) is the battery percentage remaining
-900, -901: Error determining power status

I can see about making it into a com executable if I had some documentation on it.

It will also output to stdio the current power source and battery percentage, so it can be used by itself.

Dan East
Attachments
PowerStatus.zip
(12.05 KiB) Downloaded 425 times
Last edited by Dan East on Nov 14, 2005 @ 10:33pm, edited 1 time in total.
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby James S » Nov 14, 2005 @ 6:54pm

James S
pm Insider
 
Posts: 17064
Joined: Jan 12, 2002 @ 2:33pm
Location: Lexington, KY


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron