Tidy up French GUI.
[nssm.git] / console.cpp
index 9a97729..b886021 100644 (file)
@@ -1,23 +1,24 @@
 #include "nssm.h"\r
 \r
 /* See if we were launched from a console window. */\r
-void check_console() {\r
+bool check_console() {\r
   /* If we're running in a service context there will be no console window. */\r
   HWND console = GetConsoleWindow();\r
-  if (! console) return;\r
+  if (! console) return false;\r
 \r
   unsigned long pid;\r
-  if (! GetWindowThreadProcessId(console, &pid)) return;\r
+  if (! GetWindowThreadProcessId(console, &pid)) return false;\r
 \r
   /*\r
     If the process associated with the console window handle is the same as\r
     this process, we were not launched from an existing console.  The user\r
     probably double-clicked our executable.\r
   */\r
-  if (GetCurrentProcessId() != pid) return;\r
+  if (GetCurrentProcessId() != pid) return true;\r
 \r
   /* We close our new console so that subsequent messages appear in a popup. */\r
   FreeConsole();\r
+  return false;\r
 }\r
 \r
 /* Helpers for drawing the banner. */\r