add a dummy wlansvc

svn path=/trunk/; revision=40033
This commit is contained in:
Christoph von Wittich 2009-03-15 13:55:41 +00:00
parent 0eec102951
commit c16fc76360
3 changed files with 99 additions and 0 deletions

View file

@ -25,4 +25,7 @@
<directory name="umpnpmgr">
<xi:include href="umpnpmgr/umpnpmgr.rbuild" />
</directory>
<directory name="wlansvc">
<xi:include href="wlansvc/wlansvc.rbuild" />
</directory>
</group>

View file

@ -0,0 +1,87 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/wlansvc/wlansvc.c
* PURPOSE: WLAN Service
* PROGRAMMER: Christoph von Wittich
*/
/* INCLUDES *****************************************************************/
#define WIN32_NO_STATUS
#include <windows.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ******************************************************************/
#define SERVICE_NAME L"WLAN Service"
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, LPWSTR *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_ENTRYW ServiceTable[2] =
{
{SERVICE_NAME, ServiceMain},
{NULL, NULL}
};
UNREFERENCED_PARAMETER(argc);
UNREFERENCED_PARAMETER(argv);
DPRINT("wlansvc: main() started\n");
StartServiceCtrlDispatcherW(ServiceTable);
DPRINT("wlansvc: main() done\n");
ExitThread(0);
return 0;
}
/* EOF */

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="wlansvc" type="win32cui" installbase="system32" installname="wlansvc.exe" unicode="yes">
<include base="wlansvc">.</include>
<library>ntdll</library>
<library>kernel32</library>
<library>advapi32</library>
<file>wlansvc.c</file>
</module>