Author: mjmartin
Date: Sat Oct 18 06:49:25 2008
New Revision: 36807
URL:
http://svn.reactos.org/svn/reactos?rev=36807&view=rev
Log:
- Fixed typo in SetMenuAndButtonStates. See bug 3792 for more info.
- Pass correct size for ServiceStatusProcess to QueryServiceStatusEx which prevents
trashing the next services information in Info buffer.
- Added missing CloseServiceHandle calls.
Modified:
trunk/reactos/base/applications/mscutils/servman/mainwnd.c
trunk/reactos/base/applications/mscutils/servman/query.c
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 [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/servman/mainwnd.c [iso-8859-1] Sat Oct 18
06:49:25 2008
@@ -161,7 +161,7 @@
for (i = ID_START; i <= ID_RESTART; i++)
{
EnableMenuItem(hMainMenu, i, MF_GRAYED);
- EnableMenuItem(GetSubMenu(Info->hShortcutMenu, 0), ID_START, MF_GRAYED);
+ EnableMenuItem(GetSubMenu(Info->hShortcutMenu, 0), i, MF_GRAYED);
SendMessage(Info->hTool, TB_SETSTATE, i,
(LPARAM)MAKELONG(TBSTATE_INDETERMINATE, 0));
}
Modified: trunk/reactos/base/applications/mscutils/servman/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/query.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/servman/query.c [iso-8859-1] Sat Oct 18
06:49:25 2008
@@ -127,10 +127,14 @@
{
bRet = TRUE;
}
+
+ CloseServiceHandle(hSc);
}
UnlockServiceDatabase(scLock);
}
+
+ CloseServiceHandle(hSCManager);
}
if (!bRet)
@@ -359,11 +363,14 @@
QueryServiceStatusEx(hService,
SC_STATUS_PROCESS_INFO,
(LPBYTE)&pService->ServiceStatusProcess,
- sizeof(*pService),
+ sizeof(SERVICE_STATUS_PROCESS),
&size);
+ CloseServiceHandle(hService);
bRet = TRUE;
}
+
+ CloseServiceHandle(hScm);
}
return bRet;