English
Regulars table & Café

GetSystemPowerStatus.

 


Description:

GetSystemPowerStatus supply Information over The Stromquellen the Rechners back. These function there not under WindowsNT.




Deklaration:

DEF @GetSystemPowerStatus(1) !kernel32,GetSystemPowerStatus




Parameter:

1.Parameter: SYSTEM_POWER_STATUS Structure or 12 Bytes large Memory-Variable, The Information over The Stromquellen aufnimmt. =>
byte 0 = Flag the angibt, whether the computer on a Steckdose connected is:
-0 = No
-1 = Yes
-255 = is uncharted.
byte 1 = Kombinationsflag, the whom Ladestatus the batteries zurückgibt:
-1 = load high.
-2 = load lowly.
-4 = load critically.
-8 = battery becomes loaded.
-128 = No Systembatterie present.
-255 = Unbekannter Ladestatus
byte 2 = Prozentuale load the Akkus:
-0 To 100 = load in percent.
-255 = load uncharted.
byte 3 = reserved, must 0 his.
byte 4-7 = One LongIntwert the angibt, How many sec The battery yet holds. If here $FFFFFFFF standing, is the Time uncharted.
byte 8-11 = The Time in sec, The the battery pack holds, if it fully aufgeladen is or $FFFFFFFF, if The Time uncharted is.



Return Value:

1 with erfolgreichem Reading, 0 with Error.


Examples:

DEF @GetSystemPowerStatus(1) !"kernel32","GetSystemPowerStatus"
Declare SystemPowerStaus#
Windowstyle 31
Windowtitle "Angeschlossene Hauptstromquelle"
Window 0,0-640,440

While 0=0

    sleep 10
    DIM SystemPowerStaus#,12
    @GetSystemPowerStatus(SystemPowerStaus#)

    IF @BYTE(SystemPowerStaus#,1)=0

        DrawText 0,0,"Batterie                            "
        Startpaint %HDC
        drawtext 0,0,"Batterie                           "
        endpaint
        Startpaint %HDC2
        drawtext 0,0,"Batterie                            "
        endpaint

    elseIF @BYTE(SystemPowerStaus#,0)=1

        DrawText 0,0,"Steckdose                            "
        Startpaint %HDC
        drawtext 0,0,"Steckdose                           "
        endpaint
        Startpaint %HDC2
        drawtext 0,0,"Steckdose                           "
        endpaint

    else

        DrawText 0,0,"Stromquelle unbekannt"
        Startpaint %HDC
        drawtext 0,0,"Stromquelle unbekannt"
        endpaint
        Startpaint %HDC2
        drawtext 0,0,"Stromquelle unbekannt"
        endpaint

    endif

    Dispose SystemPowerStaus#

Wend


[keywords:6d439a8811]
network Steckdose battery battery pack load Time Ladezeit read inquire current supply
[/keywords:6d439a8811]
 
04/18/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.761 Views

Untitledvor 0 min.
Julian Schmidt06/30/11
Juergen Baier04/05/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie