mirror of
https://github.com/reactos/reactos.git
synced 2024-07-14 00:25:05 +00:00
[SERVICES]
- services.exe is indeed a GUI program, so build it as such. - Check the return value of RegisterServicesProcess and thus allow only one instance of services.exe to be launched. CORE-6123 #resolve #comment Fixed by r57946. svn path=/trunk/; revision=57946
This commit is contained in:
parent
3a6d338be3
commit
8e4c401495
|
@ -25,7 +25,7 @@ if(NOT MSVC)
|
||||||
target_link_libraries(services ${PSEH_LIB})
|
target_link_libraries(services ${PSEH_LIB})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_module_type(services win32cui UNICODE)
|
set_module_type(services win32gui UNICODE)
|
||||||
add_importlibs(services user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
|
add_importlibs(services user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
|
||||||
add_pch(services services.h ${CMAKE_CURRENT_BINARY_DIR}/svcctl_s.h)
|
add_pch(services services.h ${CMAKE_CURRENT_BINARY_DIR}/svcctl_s.h)
|
||||||
add_cd_file(TARGET services DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET services DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* NOTE:
|
|
||||||
* - Services.exe is NOT a native application, it is a GUI app.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
|
@ -393,7 +389,7 @@ wWinMain(HINSTANCE hInstance,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the service database */
|
/* Create the services database */
|
||||||
dwError = ScmCreateServiceDatabase();
|
dwError = ScmCreateServiceDatabase();
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -401,11 +397,15 @@ wWinMain(HINSTANCE hInstance,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update service database */
|
/* Update the services database */
|
||||||
ScmGetBootAndSystemDriverState();
|
ScmGetBootAndSystemDriverState();
|
||||||
|
|
||||||
/* Register service process with CSRSS */
|
/* Register the Service Control Manager process with CSRSS */
|
||||||
RegisterServicesProcess(GetCurrentProcessId());
|
if (!RegisterServicesProcess(GetCurrentProcessId()))
|
||||||
|
{
|
||||||
|
DPRINT1("SERVICES: Could not register SCM process\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
/* Acquire the service start lock until autostart services have been started */
|
/* Acquire the service start lock until autostart services have been started */
|
||||||
dwError = ScmAcquireServiceStartLock(TRUE, &Lock);
|
dwError = ScmAcquireServiceStartLock(TRUE, &Lock);
|
||||||
|
|
Loading…
Reference in a new issue