_declspec (dllexport) int GetBatteryPercent ()
{_ POWER_STATUS sps;
GetSystemPowerStatus ( amp; sps);
return (int) sps.BatteryLifePercent;
}
extern C __declspec (dllexport) int GetBatteryTime ()
{_ POWER_STATUS sps;
GetSystemPowerStatus ( amp; sps); sps.BatteryLifeTime;
}
extern C __declspec (dllexport) int GetFullBatteryTime ()
{_ POWER_STATUS sps; ( amp; sps); sps.BatteryFullLifeTime;
}
extern C __declspec (dllexport) void SetBrightness (int Brightness)
{GammaRamp; .SetBrightness (NULL, Brightness);
}