mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
- 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. svn path=/trunk/; revision=36807
This commit is contained in:
parent
36f0316d51
commit
13005080b5
2 changed files with 9 additions and 2 deletions
|
@ -161,7 +161,7 @@ VOID SetMenuAndButtonStates(PMAIN_WND_INFO Info)
|
|||
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));
|
||||
}
|
||||
|
|
|
@ -127,10 +127,14 @@ SetServiceConfig(LPQUERY_SERVICE_CONFIG pServiceConfig,
|
|||
{
|
||||
bRet = TRUE;
|
||||
}
|
||||
|
||||
CloseServiceHandle(hSc);
|
||||
}
|
||||
|
||||
UnlockServiceDatabase(scLock);
|
||||
}
|
||||
|
||||
CloseServiceHandle(hSCManager);
|
||||
}
|
||||
|
||||
if (!bRet)
|
||||
|
@ -359,11 +363,14 @@ UpdateServiceStatus(ENUM_SERVICE_STATUS_PROCESS* pService)
|
|||
QueryServiceStatusEx(hService,
|
||||
SC_STATUS_PROCESS_INFO,
|
||||
(LPBYTE)&pService->ServiceStatusProcess,
|
||||
sizeof(*pService),
|
||||
sizeof(SERVICE_STATUS_PROCESS),
|
||||
&size);
|
||||
|
||||
CloseServiceHandle(hService);
|
||||
bRet = TRUE;
|
||||
}
|
||||
|
||||
CloseServiceHandle(hScm);
|
||||
}
|
||||
|
||||
return bRet;
|
||||
|
|
Loading…
Reference in a new issue