programs: Add stub termsv.exe.
This commit is contained in:
parent
aa2cba4e78
commit
6137b1ba2d
|
@ -28006,6 +28006,15 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
|
||||||
programs/taskmgr/Makefile: programs/taskmgr/Makefile.in programs/Makeprog.rules"
|
programs/taskmgr/Makefile: programs/taskmgr/Makefile.in programs/Makeprog.rules"
|
||||||
ac_config_files="$ac_config_files programs/taskmgr/Makefile"
|
ac_config_files="$ac_config_files programs/taskmgr/Makefile"
|
||||||
|
|
||||||
|
ALL_MAKEFILES="$ALL_MAKEFILES \\
|
||||||
|
programs/termsv/Makefile"
|
||||||
|
test "x$enable_termsv" != xno && ALL_PROGRAM_DIRS="$ALL_PROGRAM_DIRS \\
|
||||||
|
termsv" && ALL_PROGRAM_INSTALL_DIRS="$ALL_PROGRAM_INSTALL_DIRS \\
|
||||||
|
termsv"
|
||||||
|
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
|
||||||
|
programs/termsv/Makefile: programs/termsv/Makefile.in programs/Makeprog.rules"
|
||||||
|
ac_config_files="$ac_config_files programs/termsv/Makefile"
|
||||||
|
|
||||||
ALL_MAKEFILES="$ALL_MAKEFILES \\
|
ALL_MAKEFILES="$ALL_MAKEFILES \\
|
||||||
programs/uninstaller/Makefile"
|
programs/uninstaller/Makefile"
|
||||||
test "x$enable_uninstaller" != xno && ALL_PROGRAM_DIRS="$ALL_PROGRAM_DIRS \\
|
test "x$enable_uninstaller" != xno && ALL_PROGRAM_DIRS="$ALL_PROGRAM_DIRS \\
|
||||||
|
@ -29359,6 +29368,7 @@ do
|
||||||
"programs/start/Makefile") CONFIG_FILES="$CONFIG_FILES programs/start/Makefile" ;;
|
"programs/start/Makefile") CONFIG_FILES="$CONFIG_FILES programs/start/Makefile" ;;
|
||||||
"programs/svchost/Makefile") CONFIG_FILES="$CONFIG_FILES programs/svchost/Makefile" ;;
|
"programs/svchost/Makefile") CONFIG_FILES="$CONFIG_FILES programs/svchost/Makefile" ;;
|
||||||
"programs/taskmgr/Makefile") CONFIG_FILES="$CONFIG_FILES programs/taskmgr/Makefile" ;;
|
"programs/taskmgr/Makefile") CONFIG_FILES="$CONFIG_FILES programs/taskmgr/Makefile" ;;
|
||||||
|
"programs/termsv/Makefile") CONFIG_FILES="$CONFIG_FILES programs/termsv/Makefile" ;;
|
||||||
"programs/uninstaller/Makefile") CONFIG_FILES="$CONFIG_FILES programs/uninstaller/Makefile" ;;
|
"programs/uninstaller/Makefile") CONFIG_FILES="$CONFIG_FILES programs/uninstaller/Makefile" ;;
|
||||||
"programs/unlodctr/Makefile") CONFIG_FILES="$CONFIG_FILES programs/unlodctr/Makefile" ;;
|
"programs/unlodctr/Makefile") CONFIG_FILES="$CONFIG_FILES programs/unlodctr/Makefile" ;;
|
||||||
"programs/view/Makefile") CONFIG_FILES="$CONFIG_FILES programs/view/Makefile" ;;
|
"programs/view/Makefile") CONFIG_FILES="$CONFIG_FILES programs/view/Makefile" ;;
|
||||||
|
|
|
@ -2326,6 +2326,7 @@ WINE_CONFIG_MAKEFILE([programs/spoolsv/Makefile],[programs/Makeprog.rules],[prog
|
||||||
WINE_CONFIG_MAKEFILE([programs/start/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/start/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
WINE_CONFIG_MAKEFILE([programs/svchost/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/svchost/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
WINE_CONFIG_MAKEFILE([programs/taskmgr/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/taskmgr/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
|
WINE_CONFIG_MAKEFILE([programs/termsv/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
WINE_CONFIG_MAKEFILE([programs/uninstaller/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/uninstaller/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
WINE_CONFIG_MAKEFILE([programs/unlodctr/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/unlodctr/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS,ALL_PROGRAM_INSTALL_DIRS])
|
||||||
WINE_CONFIG_MAKEFILE([programs/view/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS])
|
WINE_CONFIG_MAKEFILE([programs/view/Makefile],[programs/Makeprog.rules],[programs],[ALL_PROGRAM_DIRS])
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
|
||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = termsv.exe
|
||||||
|
APPMODE = -mconsole -municode
|
||||||
|
IMPORTS = advapi32 kernel32
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
main.c
|
||||||
|
|
||||||
|
@MAKE_PROG_RULES@
|
||||||
|
|
||||||
|
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2008 Hans Leidekker for CodeWeavers
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(termsv);
|
||||||
|
|
||||||
|
static WCHAR termserviceW[] = {'T','e','r','m','S','e','r','v','i','c','e',0};
|
||||||
|
|
||||||
|
static SERVICE_STATUS_HANDLE service_handle;
|
||||||
|
static HANDLE stop_event;
|
||||||
|
|
||||||
|
static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_data, LPVOID context )
|
||||||
|
{
|
||||||
|
SERVICE_STATUS status;
|
||||||
|
|
||||||
|
status.dwServiceType = SERVICE_WIN32;
|
||||||
|
status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
|
||||||
|
status.dwWin32ExitCode = 0;
|
||||||
|
status.dwServiceSpecificExitCode = 0;
|
||||||
|
status.dwCheckPoint = 0;
|
||||||
|
status.dwWaitHint = 0;
|
||||||
|
|
||||||
|
switch(ctrl)
|
||||||
|
{
|
||||||
|
case SERVICE_CONTROL_STOP:
|
||||||
|
case SERVICE_CONTROL_SHUTDOWN:
|
||||||
|
WINE_TRACE( "shutting down\n" );
|
||||||
|
status.dwCurrentState = SERVICE_STOP_PENDING;
|
||||||
|
status.dwControlsAccepted = 0;
|
||||||
|
SetServiceStatus( service_handle, &status );
|
||||||
|
SetEvent( stop_event );
|
||||||
|
return NO_ERROR;
|
||||||
|
default:
|
||||||
|
WINE_FIXME( "got service ctrl %x\n", ctrl );
|
||||||
|
status.dwCurrentState = SERVICE_RUNNING;
|
||||||
|
SetServiceStatus( service_handle, &status );
|
||||||
|
return NO_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
|
||||||
|
{
|
||||||
|
SERVICE_STATUS status;
|
||||||
|
|
||||||
|
WINE_TRACE( "starting service\n" );
|
||||||
|
|
||||||
|
stop_event = CreateEventW( NULL, TRUE, FALSE, NULL );
|
||||||
|
|
||||||
|
service_handle = RegisterServiceCtrlHandlerExW( termserviceW, service_handler, NULL );
|
||||||
|
if (!service_handle)
|
||||||
|
return;
|
||||||
|
|
||||||
|
status.dwServiceType = SERVICE_WIN32;
|
||||||
|
status.dwCurrentState = SERVICE_RUNNING;
|
||||||
|
status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
|
||||||
|
status.dwWin32ExitCode = 0;
|
||||||
|
status.dwServiceSpecificExitCode = 0;
|
||||||
|
status.dwCheckPoint = 0;
|
||||||
|
status.dwWaitHint = 10000;
|
||||||
|
SetServiceStatus( service_handle, &status );
|
||||||
|
|
||||||
|
WaitForSingleObject( stop_event, INFINITE );
|
||||||
|
|
||||||
|
status.dwCurrentState = SERVICE_STOPPED;
|
||||||
|
status.dwControlsAccepted = 0;
|
||||||
|
SetServiceStatus( service_handle, &status );
|
||||||
|
WINE_TRACE( "service stopped\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
int wmain( int argc, WCHAR *argv[] )
|
||||||
|
{
|
||||||
|
static const SERVICE_TABLE_ENTRYW service_table[] =
|
||||||
|
{
|
||||||
|
{ termserviceW, ServiceMain },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
StartServiceCtrlDispatcherW( service_table );
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -78,10 +78,12 @@ AddReg=\
|
||||||
[DefaultInstall.Services]
|
[DefaultInstall.Services]
|
||||||
AddService=MountMgr,0x800,MountMgrService
|
AddService=MountMgr,0x800,MountMgrService
|
||||||
AddService=Spooler,0,SpoolerService
|
AddService=Spooler,0,SpoolerService
|
||||||
|
AddService=TermService,0,TerminalServices
|
||||||
|
|
||||||
[DefaultInstall.NT.Services]
|
[DefaultInstall.NT.Services]
|
||||||
AddService=MountMgr,0x800,MountMgrService
|
AddService=MountMgr,0x800,MountMgrService
|
||||||
AddService=Spooler,0,SpoolerService
|
AddService=Spooler,0,SpoolerService
|
||||||
|
AddService=TermService,0,TerminalServices
|
||||||
|
|
||||||
[Strings]
|
[Strings]
|
||||||
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
|
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
|
||||||
|
@ -2904,6 +2906,14 @@ StartType=4
|
||||||
ErrorControl=1
|
ErrorControl=1
|
||||||
LoadOrderGroup="SpoolerGroup"
|
LoadOrderGroup="SpoolerGroup"
|
||||||
|
|
||||||
|
[TerminalServices]
|
||||||
|
Description="Remote desktop access"
|
||||||
|
DisplayName="Terminal Services"
|
||||||
|
ServiceBinary="%11%\termsv.exe"
|
||||||
|
ServiceType=32
|
||||||
|
StartType=3
|
||||||
|
ErrorControl=1
|
||||||
|
|
||||||
[Services]
|
[Services]
|
||||||
HKLM,"System\CurrentControlSet\Services\VxD\MSTCP",,,""
|
HKLM,"System\CurrentControlSet\Services\VxD\MSTCP",,,""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue