public static bool SetDeviceState(PowerDevice device, bool value) { return(PowerManagement.DevicePowerSetDeviceState(device.Name, value ? SetFlags.DEVICEPOWER_SET_WAKEENABLED : SetFlags.DEVICEPOWER_CLEAR_WAKEENABLED, IntPtr.Zero) == 0); }
public static bool SetDeviceState(PowerDevice device, bool value) { return(PowerManagement.DevicePowerSetDeviceState(device.Name, value ? SetFlags.DEVICEPOWER_SET_WAKEENABLED : SetFlags.DEVICEPOWER_CLEAR_WAKEENABLED, IntPtr.Zero) == 0); }