[DllImport("powrprof.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES systemPowerCapabilites);
Declare Function GetPwrCapabilities Lib "powrprof.dll" (TODO) As TODO
Do you know one? Please contribute it!
None.
Please add some!
[DllImport("powrprof.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.U1)]
static extern bool GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES systemPowerCapabilites);
static SYSTEM_POWER_CAPABILITIES systemPowerCapabilites;
static PowerStatus()
{
GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES);
}
/// <summary>
/// Check out if there is a power botton present in the system.
/// </summary>
public static bool PowerButtonPresent
{
get
{
return systemPowerCapabilites.PowerButtonPresent;
}
}
/// <summary>
/// Check out if there is a sleep botton present in the system.
/// </summary>
public static bool SleepButtonPresent
{
get
{
return systemPowerCapabilites.SleepButtonPresent;
}
}