Author: gedmurphy
Date: Sat Aug 25 18:51:36 2007
New Revision: 28545
URL:
http://svn.reactos.org/svn/reactos?rev=28545&view=rev
Log:
fix stop / pause / resume
Removed:
trunk/reactos/base/applications/mscutils/servman/res/exit.bmp
trunk/reactos/base/applications/mscutils/servman/res/help.bmp
trunk/reactos/base/applications/mscutils/servman/stop.c
Modified:
trunk/reactos/base/applications/mscutils/servman/control.c
trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc
trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc
trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc
trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc
trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc
trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc
trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc
trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc
trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc
trunk/reactos/base/applications/mscutils/servman/mainwnd.c
trunk/reactos/base/applications/mscutils/servman/precomp.h
trunk/reactos/base/applications/mscutils/servman/progress.c
trunk/reactos/base/applications/mscutils/servman/resource.h
trunk/reactos/base/applications/mscutils/servman/rsrc.rc
trunk/reactos/base/applications/mscutils/servman/servman.rbuild
trunk/reactos/base/applications/mscutils/servman/start.c
Modified: trunk/reactos/base/applications/mscutils/servman/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/control.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/control.c Sat Aug 25 18:51:36 2007
@@ -9,7 +9,7 @@
#include "precomp.h"
-BOOL
+static BOOL
Control(PMAIN_WND_INFO Info,
HWND hProgDlg,
DWORD Control)
@@ -131,3 +131,67 @@
return FALSE;
}
+
+BOOL DoStop(PMAIN_WND_INFO Info)
+{
+ BOOL ret = FALSE;
+ HWND hProgDlg;
+
+ hProgDlg = CreateProgressDialog(Info->hMainWnd,
+ Info->CurrentService->lpServiceName,
+ IDS_PROGRESS_INFO_STOP);
+
+ if (hProgDlg)
+ {
+ ret = Control(Info,
+ hProgDlg,
+ SERVICE_CONTROL_STOP);
+
+ SendMessage(hProgDlg, WM_DESTROY, 0, 0);
+ }
+
+ return ret;
+}
+
+BOOL DoPause(PMAIN_WND_INFO Info)
+{
+ BOOL ret = FALSE;
+ HWND hProgDlg;
+
+ hProgDlg = CreateProgressDialog(Info->hMainWnd,
+ Info->CurrentService->lpServiceName,
+ IDS_PROGRESS_INFO_PAUSE);
+
+ if (hProgDlg)
+ {
+ ret = Control(Info,
+ hProgDlg,
+ SERVICE_CONTROL_STOP);
+
+ SendMessage(hProgDlg, WM_DESTROY, 0, 0);
+ }
+
+ return ret;
+}
+
+BOOL DoResume(PMAIN_WND_INFO Info)
+{
+ BOOL ret = FALSE;
+ HWND hProgDlg;
+
+ hProgDlg = CreateProgressDialog(Info->hMainWnd,
+ Info->CurrentService->lpServiceName,
+ IDS_PROGRESS_INFO_RESUME);
+
+ if (hProgDlg)
+ {
+ ret = Control(Info,
+ hProgDlg,
+ SERVICE_CONTROL_STOP);
+
+ SendMessage(hProgDlg, WM_DESTROY, 0, 0);
+ }
+
+ return ret;
+}
+
Modified: trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/bg-BG.rc Sat Aug 25 18:51:36
2007
@@ -214,6 +214,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ÐåàêòÎÑ ñå îïèòâà äà ïóñíå ñëåäíàòà óñëóãà"
IDS_PROGRESS_INFO_STOP "ÐåàêòÎÑ ñå îïèòâà äà ñïðå ñëåäíàòà óñëóãà"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Óñëóãàòà å óñïåøíî ñúçäàäåíà"
IDS_CREATE_REQ "Ïîëåòàòà, îòáåëÿçàíè ñúñ \nçâåçäè÷êà ñà íåàçàäúëæèòåëíè"
IDS_DELETE_STOP "Òðÿáâà ðú÷íî äà ñïðåòå óñëóãàòà, ïðåäè äà ÿ èçòðèåòå!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/de-DE.rc Sat Aug 25 18:51:36
2007
@@ -210,6 +210,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS versucht den folgenden Dienst zu starten"
IDS_PROGRESS_INFO_STOP "ReactOS versucht den folgenden Dienst zu beenden"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Dienst wurde erfolgreich erstellt"
IDS_CREATE_REQ "Mit einem Sternchen gekennzeichnete Felder sind
erforderlich"
IDS_DELETE_STOP "Sie müssen den Dienst manuell beenden, bevor er gelöscht werden
kann!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/en-US.rc Sat Aug 25 18:51:36
2007
@@ -208,8 +208,10 @@
STRINGTABLE DISCARDABLE
BEGIN
- IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following
service"
- IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following
service"
+ IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following
service"
+ IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following
service"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Service Created Succesfully"
IDS_CREATE_REQ "Fields marked with an\nasterix are mandatory"
IDS_DELETE_STOP "You must manually stop the service before deleting!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/fr-FR.rc Sat Aug 25 18:51:36
2007
@@ -214,6 +214,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS essaye de démarrer le service suivant"
IDS_PROGRESS_INFO_STOP "ReactOS essaye d'arrêter le service suivant"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Service créé"
IDS_CREATE_REQ "Les champs marqués d'une astérisque\nasont obligatoires"
IDS_DELETE_STOP "Vous devez arrêter le service avant de le supprimer!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/id-ID.rc Sat Aug 25 18:51:36
2007
@@ -210,6 +210,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS sedang mencoba untuk memulai layanan
berikut"
IDS_PROGRESS_INFO_STOP "ReactOS sedang mencoba untuk menghentikan layanan
berikut"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Layanan Dibuat Dengan Sukses"
IDS_CREATE_REQ "Field yang ditandai dengan\nbintang adalah
mandatori"
IDS_DELETE_STOP "Anda harus menghentikan layanan sebelum menghapus!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/it-IT.rc Sat Aug 25 18:51:36
2007
@@ -210,6 +210,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS sta avviando il seguente servizio"
IDS_PROGRESS_INFO_STOP "ReactOS sta fermando il seguente servizio"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Servizio creato regolarmente"
IDS_CREATE_REQ "I campi marcati con un asterisco\nsono obbligatori"
IDS_DELETE_STOP "Devi fermare il servizio prima di cancellare!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/pl-PL.rc Sat Aug 25 18:51:36
2007
@@ -217,6 +217,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS usi³uje uruchomiæ nastêpuj¹c¹ us³ugê"
IDS_PROGRESS_INFO_STOP "ReactOS usi³uje zatrzymaæ nastêpuj¹c¹ us³ugê"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Us³uga utworzona pomylnie"
IDS_CREATE_REQ "Pole zaznaczone wraz z \ nasterix jest obowi¹zkowy"
IDS_DELETE_STOP "Musisz rêcznie zatrzymaæ us³ugê przed usuwaniem!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/ru-RU.rc Sat Aug 25 18:51:36
2007
@@ -209,6 +209,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS ïûòàåòñÿ çàïóñòèòü ñëóæáó"
IDS_PROGRESS_INFO_STOP "ReactOS ïûòàåòñÿ îñòàíîâèòü ñëóæáó"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Ñîçäàíèå ñëóæáû óñïåøíî çàâåðøåíî"
IDS_CREATE_REQ "* = îáÿçàòåëüíûå ïîëÿ"
IDS_DELETE_STOP "Âû äîëæíû âðó÷íóþ îñòàíîâèòü ñëóæáó ïåðåä óäàëåíèåì!"
Modified: trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/lang/th-TH.rc Sat Aug 25 18:51:36
2007
@@ -219,6 +219,8 @@
BEGIN
IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following
service"
IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following
service"
+ IDS_PROGRESS_INFO_PAUSE "ReactOS is attempting to pause the following
service"
+ IDS_PROGRESS_INFO_RESUME "ReactOS is attempting to resume the following
service"
IDS_CREATE_SUCCESS "Service Created Succesfully"
IDS_CREATE_REQ "Fields marked with an\nasterix are mandatory"
IDS_DELETE_STOP "You must manually stop the service before deleting!"
Modified: trunk/reactos/base/applications/mscutils/servman/mainwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/mainwnd.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/mainwnd.c Sat Aug 25 18:51:36 2007
@@ -644,24 +644,16 @@
break;
case ID_STOP:
- {
if (DoStop(Info))
SetMenuAndButtonStates(Info);
- }
break;
case ID_PAUSE:
- {
- //Control(Info,
- // SERVICE_CONTROL_PAUSE);
- }
+ DoPause(Info);
break;
case ID_RESUME:
- {
- //Control(Info,
- // SERVICE_CONTROL_CONTINUE );
- }
+ DoResume(Info);
break;
case ID_RESTART:
Modified: trunk/reactos/base/applications/mscutils/servman/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/precomp.h (original)
+++ trunk/reactos/base/applications/mscutils/servman/precomp.h Sat Aug 25 18:51:36 2007
@@ -60,23 +60,26 @@
BOOL DoStart(PMAIN_WND_INFO Info);
/* stop */
-BOOL DoStop(PMAIN_WND_INFO Info);
+
/* control */
-BOOL Control(PMAIN_WND_INFO Info, HWND hProgDlg, DWORD Control);
+BOOL DoStop(PMAIN_WND_INFO Info);
+BOOL DoPause(PMAIN_WND_INFO Info);
+BOOL DoResume(PMAIN_WND_INFO Info);
/* progress.c */
-HWND CreateProgressDialog(HWND hParent, LPTSTR lpServiceName);
+HWND CreateProgressDialog(HWND hParent, LPTSTR lpServiceName, UINT Event);
VOID IncrementProgressBar(HWND hProgDlg);
VOID CompleteProgressBar(HWND hProgDlg);
/* query.c */
ENUM_SERVICE_STATUS_PROCESS* GetSelectedService(PMAIN_WND_INFO Info);
+LPTSTR GetExecutablePath(PMAIN_WND_INFO Info);
+BOOL RefreshServiceList(PMAIN_WND_INFO Info);
+
+/* reg */
BOOL SetDescription(LPTSTR, LPTSTR);
LPTSTR GetDescription(LPTSTR);
-LPTSTR GetExecutablePath(PMAIN_WND_INFO Info);
-BOOL RefreshServiceList(PMAIN_WND_INFO Info);
-//DWORD GetServiceList(PMAIN_WND_INFO Info);
/* propsheet.c */
LONG APIENTRY OpenPropSheet(PMAIN_WND_INFO Info);
Modified: trunk/reactos/base/applications/mscutils/servman/progress.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/progress.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/progress.c Sat Aug 25 18:51:36 2007
@@ -96,7 +96,8 @@
HWND
CreateProgressDialog(HWND hParent,
- LPTSTR lpServiceName)
+ LPTSTR lpServiceName,
+ UINT Event)
{
HWND hProgDlg;
TCHAR ProgDlgBuf[100];
@@ -113,7 +114,7 @@
/* write the info to the progress dialog */
LoadString(hInstance,
- IDS_PROGRESS_INFO_STOP,
+ Event,
ProgDlgBuf,
sizeof(ProgDlgBuf) / sizeof(TCHAR));
Removed: trunk/reactos/base/applications/mscutils/servman/res/exit.bmp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
Binary file - no diff available.
Removed: trunk/reactos/base/applications/mscutils/servman/res/help.bmp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
Binary file - no diff available.
Modified: trunk/reactos/base/applications/mscutils/servman/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/resource.h (original)
+++ trunk/reactos/base/applications/mscutils/servman/resource.h Sat Aug 25 18:51:36 2007
@@ -164,11 +164,13 @@
/* progress bar */
-#define IDD_DLG_PROGRESS 7000
-#define IDC_SERVCON_PROGRESS 7001
-#define IDC_SERVCON_INFO 7002
-#define IDC_SERVCON_NAME 7003
-#define IDS_PROGRESS_INFO_START 7004
-#define IDS_PROGRESS_INFO_STOP 7005
+#define IDD_DLG_PROGRESS 7000
+#define IDC_SERVCON_PROGRESS 7001
+#define IDC_SERVCON_INFO 7002
+#define IDC_SERVCON_NAME 7003
+#define IDS_PROGRESS_INFO_START 7004
+#define IDS_PROGRESS_INFO_STOP 7005
+#define IDS_PROGRESS_INFO_PAUSE 7006
+#define IDS_PROGRESS_INFO_RESUME 7007
Modified: trunk/reactos/base/applications/mscutils/servman/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/rsrc.rc (original)
+++ trunk/reactos/base/applications/mscutils/servman/rsrc.rc Sat Aug 25 18:51:36 2007
@@ -17,8 +17,6 @@
IDB_STOP BITMAP DISCARDABLE "res/stop.bmp"
IDB_PAUSE BITMAP DISCARDABLE "res/pause.bmp"
IDB_RESTART BITMAP DISCARDABLE "res/restart.bmp"
-IDB_HELP BITMAP DISCARDABLE "res/help.bmp"
-IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp"
#include "lang/bg-BG.rc"
#include "lang/de-DE.rc"
@@ -29,5 +27,3 @@
#include "lang/pl-PL.rc"
#include "lang/ru-RU.rc"
#include "lang/th-TH.rc"
-
-
Modified: trunk/reactos/base/applications/mscutils/servman/servman.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/servman.rbuild (original)
+++ trunk/reactos/base/applications/mscutils/servman/servman.rbuild Sat Aug 25 18:51:36
2007
@@ -27,8 +27,7 @@
<file>query.c</file>
<file>reg.c</file>
<file>servman.c</file>
- <file>start.c</file>
- <file>stop.c</file>
+ <file>start.c</file>
</compilationunit>
<file>servman.rc</file>
<pch>precomp.h</pch>
Modified: trunk/reactos/base/applications/mscutils/servman/start.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/start.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/start.c Sat Aug 25 18:51:36 2007
@@ -130,7 +130,8 @@
BOOL bRet = FALSE;
hProgDlg = CreateProgressDialog(Info->hMainWnd,
- Info->CurrentService->lpServiceName);
+ Info->CurrentService->lpServiceName,
+ IDS_PROGRESS_INFO_START);
if (hProgDlg)
{
Removed: trunk/reactos/base/applications/mscutils/servman/stop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/stop.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/stop.c (removed)
@@ -1,30 +1,0 @@
-/*
- * PROJECT: ReactOS Services
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: base/applications/mscutils/servman/stop.c
- * PURPOSE: Stops a service
- * COPYRIGHT: Copyright 2005-2007 Ged Murphy <gedmurphy(a)reactos.org>
- *
- */
-
-#include "precomp.h"
-
-BOOL DoStop(PMAIN_WND_INFO Info)
-{
- BOOL ret = FALSE;
- HWND hProgDlg;
-
- hProgDlg = CreateProgressDialog(Info->hMainWnd,
- Info->CurrentService->lpServiceName);
-
- if (hProgDlg)
- {
- ret = Control(Info,
- hProgDlg,
- SERVICE_CONTROL_STOP);
-
- SendMessage(hProgDlg, WM_DESTROY, 0, 0);
- }
-
- return ret;
-}