There is a function GetSystemPowerStatusEx2 defined for CE.

Structure definition:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfsystempowerstatusex2.asp

Function definition:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfGetSystemPowerStatusEx2.asp


2006-11-26  Kevin O'Connor  <[EMAIL PROTECTED]>

        * include/winbase.h: Add SYSTEM_POWER_STATUS_EX2 structure.
          Add GetSystemPowerStatusEx2 function definition.


Index: src/w32api/include/winbase.h
===================================================================
--- src/w32api/include/winbase.h        (revision 824)
+++ src/w32api/include/winbase.h        (working copy)
@@ -992,6 +992,30 @@
       WORD wCertificateType;
       BYTE bCertificate[1];
 } WIN_CERTIFICATE, *LPWIN_CERTIFICATE;
+#ifdef _WIN32_WCE
+typedef struct _SYSTEM_POWER_STATUS_EX2 {
+  BYTE ACLineStatus;
+  BYTE BatteryFlag;
+  BYTE BatteryLifePercent;
+  BYTE Reserved1;
+  DWORD BatteryLifeTime;
+  DWORD BatteryFullLifeTime;
+  BYTE Reserved2;
+  BYTE BackupBatteryFlag;
+  BYTE BackupBatteryLifePercent;
+  BYTE Reserved3;
+  DWORD BackupBatteryLifeTime;
+  DWORD BackupBatteryFullLifeTime;
+  DWORD BatteryVoltage;
+  DWORD BatteryCurrent;
+  DWORD BatteryAverageCurrent;
+  DWORD BatteryAverageInterval;
+  DWORD BatterymAHourConsumed;
+  DWORD BatteryTemperature;
+  DWORD BackupBatteryVoltage;
+  BYTE BatteryChemistry;
+} SYSTEM_POWER_STATUS_EX2, *PSYSTEM_POWER_STATUS_EX2, 
*LPSYSTEM_POWER_STATUS_EX2;
+#endif
 #if (_WIN32_WINNT >= 0x0501)
 typedef struct tagACTCTXA {
        ULONG cbSize;
@@ -1547,6 +1571,9 @@
 WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
 WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
 WINBASEAPI BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
+#ifdef _WIN32_WCE
+WINBASEAPI DWORD GetSystemPowerStatusEx2(PSYSTEM_POWER_STATUS_EX2,DWORD,BOOL);
+#endif
 #if (_WIN32_WINNT >= 0x0502)
 WINBASEAPI BOOL WINAPI GetSystemRegistryQuota(PDWORD,PDWORD);
 #endif

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to