mirror of
https://github.com/reactos/reactos.git
synced 2025-01-11 16:51:06 +00:00
Add a spooler service skeleton. Now the Service-Winetests can be used unmodified.
svn path=/trunk/; revision=35916
This commit is contained in:
parent
c0caf327af
commit
cfa76e5fd6
4 changed files with 107 additions and 0 deletions
|
@ -13,6 +13,9 @@
|
||||||
<directory name="rpcss">
|
<directory name="rpcss">
|
||||||
<xi:include href="rpcss/rpcss.rbuild" />
|
<xi:include href="rpcss/rpcss.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
<directory name="spoolsv">
|
||||||
|
<xi:include href="spoolsv/spoolsv.rbuild" />
|
||||||
|
</directory>
|
||||||
<directory name="svchost">
|
<directory name="svchost">
|
||||||
<xi:include href="svchost/svchost.rbuild" />
|
<xi:include href="svchost/svchost.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
|
87
reactos/base/services/spoolsv/spoolsv.c
Normal file
87
reactos/base/services/spoolsv/spoolsv.c
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS kernel
|
||||||
|
* FILE: services/spoolsv/spoolsv.c
|
||||||
|
* PURPOSE: Printer spooler
|
||||||
|
* PROGRAMMER: Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
#define SERVICE_NAME TEXT("Spooler")
|
||||||
|
|
||||||
|
SERVICE_STATUS_HANDLE ServiceStatusHandle;
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
static DWORD WINAPI
|
||||||
|
ServiceControlHandler(DWORD dwControl,
|
||||||
|
DWORD dwEventType,
|
||||||
|
LPVOID lpEventData,
|
||||||
|
LPVOID lpContext)
|
||||||
|
{
|
||||||
|
switch (dwControl)
|
||||||
|
{
|
||||||
|
case SERVICE_CONTROL_STOP:
|
||||||
|
case SERVICE_CONTROL_SHUTDOWN:
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
|
default :
|
||||||
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static VOID CALLBACK
|
||||||
|
ServiceMain(DWORD argc, LPTSTR *argv)
|
||||||
|
{
|
||||||
|
UNREFERENCED_PARAMETER(argc);
|
||||||
|
UNREFERENCED_PARAMETER(argv);
|
||||||
|
|
||||||
|
DPRINT("ServiceMain() called\n");
|
||||||
|
|
||||||
|
ServiceStatusHandle = RegisterServiceCtrlHandlerExW(SERVICE_NAME,
|
||||||
|
ServiceControlHandler,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DPRINT("ServiceMain() done\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
wmain(int argc, WCHAR *argv[])
|
||||||
|
{
|
||||||
|
SERVICE_TABLE_ENTRY ServiceTable[2] =
|
||||||
|
{
|
||||||
|
{SERVICE_NAME, ServiceMain},
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(argc);
|
||||||
|
UNREFERENCED_PARAMETER(argv);
|
||||||
|
|
||||||
|
DPRINT("Spoolsv: main() started\n");
|
||||||
|
|
||||||
|
StartServiceCtrlDispatcher(ServiceTable);
|
||||||
|
|
||||||
|
DPRINT("Spoolsv: main() done\n");
|
||||||
|
|
||||||
|
ExitThread(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
13
reactos/base/services/spoolsv/spoolsv.rbuild
Normal file
13
reactos/base/services/spoolsv/spoolsv.rbuild
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||||
|
<module name="spoolsv" type="win32cui" installbase="system32" installname="spoolsv.exe" unicode="yes">
|
||||||
|
<include base="spoolsv">.</include>
|
||||||
|
<define name="WINVER">0x600</define>
|
||||||
|
<define name="_WIN32_IE">0x0500</define>
|
||||||
|
<define name="_WIN32_WINNT">0x0600</define>
|
||||||
|
<library>ntdll</library>
|
||||||
|
<library>kernel32</library>
|
||||||
|
<library>advapi32</library>
|
||||||
|
<file>spoolsv.c</file>
|
||||||
|
<file>spoolsv.rc</file>
|
||||||
|
</module>
|
4
reactos/base/services/spoolsv/spoolsv.rc
Normal file
4
reactos/base/services/spoolsv/spoolsv.rc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#define REACTOS_STR_FILE_DESCRIPTION "Spooler-Service\0"
|
||||||
|
#define REACTOS_STR_INTERNAL_NAME "Spoolsv\0"
|
||||||
|
#define REACTOS_STR_ORIGINAL_FILENAME "Spoolsv.exe\0"
|
||||||
|
#include <reactos/version.rc>
|
Loading…
Reference in a new issue