File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ Public Class WinNUT
100100 Private Event On_Line()
101101 Private Event UpdateNotifyIconStr( ByVal Reason As String , ByVal Message As String )
102102 Private Event UpdateBatteryState( ByVal Reason As String )
103- Declare Function SetSystemPowerState Lib "kernel32 " ( ByVal fSuspend As Integer , ByVal fForce As Integer ) As Integer
103+ Declare Function SetSuspendState Lib "PowrProf " ( ByVal Hibernate As Integer , ByVal ForceCritical As Integer , ByVal DisableWakeEvent As Integer ) As Integer
104104
105105 Public Property UpdateMethod() As String
106106 Get
@@ -980,9 +980,9 @@ Public Class WinNUT
980980 Case 0
981981 Process.Start( "C:\WINDOWS\system32\Shutdown.exe" , "-f -s -t 0" )
982982 Case 1
983- SetSystemPowerState( True , 0 )
983+ SetSuspendState( False , False , True ) 'Suspend
984984 Case 2
985- SetSystemPowerState( False , 0 )
985+ SetSuspendState( True , False , True ) 'Hibernate
986986 End Select
987987 End Sub
988988
You can’t perform that action at this time.
0 commit comments