[DllImport("advapi32.dll", SetLastError=true)]
static extern extern int SetPowerRequirement(string DeviceName, DevicePowerState State, uint dwDeviceFlags, string Name, ulong Reserved);
Declare Function SetPowerRequirement Lib "advapi32.dll" (TODO) As TODO
public enum DevicePowerState : int
{
Unspecified = -1,
D0 = 0, // Full On: full power, full functionality
D1, // Low Power On: fully functional at low power/performance
D2, // Standby: partially powered with automatic wake
D3, // Sleep: partially powered with device initiated wake
D4, // Off: unpowered
}
Do you know one? Please contribute it!
None.
Please add some!
public static void setBackLightOn()
{
try
{
unsafe
{
SetPowerRequirement("BKL1:",DevicePowerState.D0,POWER_NAME,null,0);
}
}
catch ( Exception ex )
{
String str = ex.Message;
}
}