File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
shadowsocks-csharp/Controller/System Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,10 @@ public static bool Check()
115
115
[ DllImport ( "kernel32.dll" , SetLastError = true ) ]
116
116
static extern int UnregisterApplicationRestart ( ) ;
117
117
118
+ [ Flags ]
118
119
enum ApplicationRestartFlags
119
120
{
121
+ RESTART_ALWAYS = 0 ,
120
122
RESTART_NO_CRASH = 1 ,
121
123
RESTART_NO_HANG = 2 ,
122
124
RESTART_NO_PATCH = 4 ,
@@ -137,7 +139,7 @@ public static void RegisterForRestart(bool register)
137
139
string cmdline = string . Join ( " " , args ) ;
138
140
// first parameter is process command line parameter
139
141
// needn't include the name of the executable in the command line
140
- RegisterApplicationRestart ( cmdline , ( int ) ApplicationRestartFlags . RESTART_NO_CRASH | ( int ) ApplicationRestartFlags . RESTART_NO_HANG ) ;
142
+ RegisterApplicationRestart ( cmdline , ( int ) ( ApplicationRestartFlags . RESTART_NO_CRASH | ApplicationRestartFlags . RESTART_NO_HANG ) ) ;
141
143
Logging . Debug ( "Register restart after system reboot, command line:" + cmdline ) ;
142
144
}
143
145
// requested unregister, which has no side effect
You can’t perform that action at this time.
0 commit comments