[ros-diffs] [cwittich] 29493: Disabled service has start button enabled (patch by gabrielilardi at hotmail dot it) - modified by myself (HeapFree, formatting) See issue #2519 for more details.

cwittich at svn.reactos.org cwittich at svn.reactos.org
Thu Oct 11 12:15:47 CEST 2007


Author: cwittich
Date: Thu Oct 11 14:15:46 2007
New Revision: 29493

URL: http://svn.reactos.org/svn/reactos?rev=29493&view=rev
Log:
Disabled service has start button enabled (patch by gabrielilardi at hotmail dot it) - modified by myself (HeapFree, formatting)
See issue #2519 for more details.

Modified:
    trunk/reactos/base/applications/mscutils/servman/propsheet.c

Modified: trunk/reactos/base/applications/mscutils/servman/propsheet.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils/servman/propsheet.c?rev=29493&r1=29492&r2=29493&view=diff
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/propsheet.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/propsheet.c Thu Oct 11 14:15:46 2007
@@ -23,9 +23,11 @@
     HWND hButton;
     DWORD Flags, State;
     UINT i;
+    LPQUERY_SERVICE_CONFIG lpServiceConfig;
 
     Flags = dlgInfo->pService->ServiceStatusProcess.dwControlsAccepted;
     State = dlgInfo->pService->ServiceStatusProcess.dwCurrentState;
+    lpServiceConfig = GetServiceConfig(dlgInfo->pService->lpServiceName);
 
     for (i = IDC_START; i <= IDC_RESUME; i++)
     {
@@ -33,7 +35,7 @@
         EnableWindow (hButton, FALSE);
     }
 
-    if (State == SERVICE_STOPPED)
+    if ( (State == SERVICE_STOPPED) && (lpServiceConfig->dwStartType != SERVICE_DISABLED) )
     {
         hButton = GetDlgItem(hwndDlg, IDC_START);
         EnableWindow (hButton, TRUE);
@@ -48,6 +50,11 @@
         hButton = GetDlgItem(hwndDlg, IDC_PAUSE);
         EnableWindow (hButton, TRUE);
     }
+
+    HeapFree(ProcessHeap,
+                 0,
+                 lpServiceConfig);
+
 }
 
 
@@ -485,3 +492,4 @@
     return Ret;
 }
 
+




More information about the Ros-diffs mailing list