Author: fireball Date: Wed Oct 14 20:29:45 2015 New Revision: 69530
URL: http://svn.reactos.org/svn/reactos?rev=69530&view=rev Log: [ARWINSS] - Move the patch file to the right place. Patch size increased to 19Kb.
Removed: branches/arwinss/arwinss/trunk.patch Modified: branches/arwinss/trunk.diff
Removed: branches/arwinss/arwinss/trunk.patch URL: http://svn.reactos.org/svn/reactos/branches/arwinss/arwinss/trunk.patch?rev=... ============================================================================== --- branches/arwinss/arwinss/trunk.patch [iso-8859-1] (original) +++ branches/arwinss/arwinss/trunk.patch (removed) @@ -1,655 +0,0 @@ -Index: base/system/smss/smsubsys.c -=================================================================== ---- base/system/smss/smsubsys.c (revision 69519) -+++ base/system/smss/smsubsys.c (working copy) -@@ -10,7 +10,7 @@ - - #include "smss.h" - --#define NDEBUG -+//#define NDEBUG - #include <debug.h> - - /* GLOBALS ********************************************************************/ -Index: base/system/winlogon/winlogon.c -=================================================================== ---- base/system/winlogon/winlogon.c (revision 69519) -+++ base/system/winlogon/winlogon.c (working copy) -@@ -397,7 +397,7 @@ - HandleShutdown(WLSession, WLX_SAS_ACTION_SHUTDOWN_REBOOT); - ExitProcess(1); - } -- -+ERR("WL Desktop: %x\n", WLSession->WinlogonDesktop); - DisplayStatusMessage(WLSession, WLSession->WinlogonDesktop, IDS_REACTOSISSTARTINGUP); - - #if 0 -Index: cmake/baseaddress.cmake -=================================================================== ---- cmake/baseaddress.cmake (revision 69519) -+++ cmake/baseaddress.cmake (working copy) -@@ -2,7 +2,7 @@ - set(baseaddress_kernel32 0x7c770000) - set(baseaddress_msvcrt 0x7c6c0000) - set(baseaddress_advapi32 0x7c610000) --set(baseaddress_gdi32 0x7c570000) -+set(baseaddress_gdi32 0x7c580000) - set(baseaddress_user32 0x7c3d0000) - set(baseaddress_dhcpcsvc 0x7c380000) - set(baseaddress_dnsapi 0x7c330000) -Index: cmake/config.cmake -=================================================================== ---- cmake/config.cmake (revision 69519) -+++ cmake/config.cmake (working copy) -@@ -58,6 +58,9 @@ - "Whether to compile support for ELF files. - Do not enable unless you know what you're doing.") - -+set(_ARWINSS_ TRUE CACHE BOOL -+"Whether to build and use Wine-based Win32 subsystem.") -+ - set(NSWPAT FALSE CACHE BOOL - "Whether to build apps/libs with features covered by software patents. - If you live in a country where software patents are valid/apply, don't -Index: CMakeLists.txt -=================================================================== ---- CMakeLists.txt (revision 69519) -+++ CMakeLists.txt (working copy) -@@ -166,6 +166,10 @@ - add_definitions(-D_WINKD_=1) - endif() - -+ if(_ARWINSS_) -+ add_definitions(-D_ARWINSS_=1) -+ endif() -+ - if(CMAKE_VERSION MATCHES "ReactOS") - set(PCH 1 CACHE BOOL "Whether to use precompiled headers") - else() -@@ -279,6 +283,9 @@ - add_subdirectory(subsystems) - add_subdirectory(tools/wpp) - add_subdirectory(win32ss) -+ if (_ARWINSS_) -+ add_subdirectory(arwinss) -+ endif() - - # Create the registry hives - create_registry_hives() -Index: dll/win32/kernel32/client/dllmain.c -=================================================================== ---- dll/win32/kernel32/client/dllmain.c (revision 69519) -+++ dll/win32/kernel32/client/dllmain.c (working copy) -@@ -131,7 +131,7 @@ - SessionId, - WIN_OBJ_DIR); - } -- -+DPRINT1("About to connect to CSR!\n"); - /* Connect to the Base Server */ - Status = CsrClientConnectToServer(SessionDir, - BASESRV_SERVERDLL_INDEX, -Index: dll/win32/msgina/gui.c -=================================================================== ---- dll/win32/msgina/gui.c (revision 69519) -+++ dll/win32/msgina/gui.c (working copy) -@@ -73,6 +73,7 @@ - - /* When SetThreadDesktop is called the system closes the desktop handle when needed - so we have to create a new handle because this handle may still be in use by winlogon */ -+#ifndef _ARWINSS_ - if (!DuplicateHandle ( GetCurrentProcess(), - msg->hDesktop, - GetCurrentProcess(), -@@ -85,6 +86,9 @@ - HeapFree(GetProcessHeap(), 0, lpParam); - return FALSE; - } -+#else -+ hDesk = msg->hDesktop; -+#endif - - if(!SetThreadDesktop(hDesk)) - { -Index: include/asm/syscalls.inc -=================================================================== ---- include/asm/syscalls.inc (revision 69519) -+++ include/asm/syscalls.inc (working copy) -@@ -1,4 +1,4 @@ -- -+ - #ifdef _M_ARM - - #include <ksarm.h> -@@ -52,103 +52,105 @@ - - SyscallId = 0 - --#ifdef _M_IX86 --#define KUSER_SHARED_SYSCALL HEX(7ffe0300) --#define KGDT_R0_CODE 8 --MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -- StackBytes = 4 * ArgCount -- FPO 0, 0, 0, 0, 0, FRAME_FPO -- mov eax, SyscallId -+#ifdef _M_IX86 -+#define KUSER_SHARED_SYSCALL HEX(7ffe0300) -+#define KGDT_R0_CODE 8 -+MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -+ StackBytes = 4 * ArgCount -+ FPO 0, 0, 0, 0, 0, FRAME_FPO -+ mov eax, SyscallId - mov edx, KUSER_SHARED_SYSCALL - call dword ptr [edx] -- ret StackBytes --ENDM --MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -- StackBytes = 4 * &ArgCount -- FPO 0, 0, 0, 0, 0, FRAME_FPO -- mov eax, SyscallId -- lea edx, [esp + 4] -- pushfd -- push KGDT_R0_CODE -- call _KiSystemService -- ret StackBytes --ENDM --#elif defined(_M_AMD64) --MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -- .ENDPROLOG -- mov eax, SyscallId -- mov r10, rcx -- syscall -- ret --ENDM --MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -- .ENDPROLOG -- EXTERN Nt&Name:PROC -- lea rax, Nt&Name[rip] -- mov r10, ArgCount * 8 -- jmp KiZwSystemService --ENDM --#elif defined(_M_PPC) --MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -- stwu 1,-16(1) -- mflr 0 -- stw 0,0(1) -- li 0, SyscallId -- sc -- lwz 0,0(1) -- mtlr 0 -- addi 1,1,16 -- blr --ENDM --#define STUBCODE_K STUBCODE_U --#elif defined(_M_MIPS) --MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -- li $8, KUSER_SHARED_SYSCALL -- lw $8,0($8) -- j $8 -- nop --ENDM --MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -- j KiSystemService -- nop --ENDM --#else --#error unsupported architecture --#endif -+ ret StackBytes -+ENDM -+MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -+ StackBytes = 4 * &ArgCount -+ FPO 0, 0, 0, 0, 0, FRAME_FPO -+ mov eax, SyscallId -+ lea edx, [esp + 4] -+ pushfd -+ push KGDT_R0_CODE -+ call _KiSystemService -+ ret StackBytes -+ENDM -+#elif defined(_M_AMD64) -+MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -+ .ENDPROLOG -+ mov eax, SyscallId -+ mov r10, rcx -+ syscall -+ ret -+ENDM -+MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -+ .ENDPROLOG -+ EXTERN Nt&Name:PROC -+ lea rax, Nt&Name[rip] -+ mov r10, ArgCount * 8 -+ jmp KiZwSystemService -+ENDM -+#elif defined(_M_PPC) -+MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -+ stwu 1,-16(1) -+ mflr 0 -+ stw 0,0(1) -+ li 0, SyscallId -+ sc -+ lwz 0,0(1) -+ mtlr 0 -+ addi 1,1,16 -+ blr -+ENDM -+#define STUBCODE_K STUBCODE_U -+#elif defined(_M_MIPS) -+MACRO(STUBCODE_U, Name, SyscallId, ArgCount) -+ li $8, KUSER_SHARED_SYSCALL -+ lw $8,0($8) -+ j $8 -+ nop -+ENDM -+MACRO(STUBCODE_K, Name, SyscallId, ArgCount) -+ j KiSystemService -+ nop -+ENDM -+#else -+#error unsupported architecture -+#endif -+ -+#ifdef _M_IX86 -+MACRO(MAKE_LABEL, Name, StackBytes) -+ PUBLIC _&Name&@&StackBytes -+ _&Name&@&StackBytes: -+ENDM -+MACRO(START_PROC, Name, StackBytes) -+ PUBLIC _&Name&@&StackBytes -+ .PROC _&Name&@&StackBytes -+ENDM -+#else -+MACRO(MAKE_LABEL, Name, StackBytes) -+ PUBLIC &Name -+ &Name: -+ENDM -+MACRO(START_PROC, Name, StackBytes) -+ PUBLIC &Name -+ .PROC &Name -+ENDM -+#endif -+ -+MACRO(STUB_U, Name, ArgCount) -+ MAKE_LABEL Zw&Name, %ArgCount * 4 -+ MAKE_LABEL Name, %ArgCount * 4 -+ START_PROC Nt&Name, %ArgCount * 4 -+ STUBCODE_U Name, SyscallId, %ArgCount -+ .ENDP -+ SyscallId = SyscallId + 1 -+ENDM -+ -+MACRO(STUB_K, Name, ArgCount) -+ MAKE_LABEL Name, %ArgCount * 4 -+ START_PROC Zw&Name, %ArgCount * 4 -+ STUBCODE_K Name, SyscallId, %ArgCount -+ .ENDP -+ SyscallId = SyscallId + 1 -+ENDM - --#ifdef _M_IX86 --MACRO(MAKE_LABEL, Name, StackBytes) -- PUBLIC _&Name&@&StackBytes -- _&Name&@&StackBytes: --ENDM --MACRO(START_PROC, Name, StackBytes) -- PUBLIC _&Name&@&StackBytes -- .PROC _&Name&@&StackBytes --ENDM --#else --MACRO(MAKE_LABEL, Name, StackBytes) -- PUBLIC &Name -- &Name: --ENDM --MACRO(START_PROC, Name, StackBytes) -- PUBLIC &Name -- .PROC &Name --ENDM - #endif -- --MACRO(STUB_U, Name, ArgCount) -- MAKE_LABEL Zw&Name, %ArgCount * 4 -- START_PROC Nt&Name, %ArgCount * 4 -- STUBCODE_U Name, SyscallId, %ArgCount -- .ENDP -- SyscallId = SyscallId + 1 --ENDM -- --MACRO(STUB_K, Name, ArgCount) -- START_PROC Zw&Name, %ArgCount * 4 -- STUBCODE_K Name, SyscallId, %ArgCount -- .ENDP -- SyscallId = SyscallId + 1 --ENDM -- --#endif -Index: include/psdk/winddi.h -=================================================================== ---- include/psdk/winddi.h (revision 69519) -+++ include/psdk/winddi.h (working copy) -@@ -2911,7 +2911,7 @@ - _In_ ULONG cjSize, - _Out_bytecap_(cjSize) FONTINFO *pfi); - --#if (NTDDI_VERSION <= NTDDI_WINXP) -+#if 0//(NTDDI_VERSION <= NTDDI_WINXP) - /* Obsolete in Windows 2000 and later */ - GAMMA_TABLES* - APIENTRY -Index: include/reactos/wine/config.h -=================================================================== ---- include/reactos/wine/config.h (revision 69519) -+++ include/reactos/wine/config.h (working copy) -@@ -1,3 +1,5 @@ -+#include "reactos/buildno.h" -+ - #define __WINE_CONFIG_H - - /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ -Index: lib/3rdparty/CMakeLists.txt -=================================================================== ---- lib/3rdparty/CMakeLists.txt (revision 69519) -+++ lib/3rdparty/CMakeLists.txt (working copy) -@@ -2,7 +2,9 @@ - add_subdirectory(adns) - add_subdirectory(bzip2) - add_subdirectory(cardlib) -+if (NOT _ARWINSS_) - add_subdirectory(freetype) -+endif () - add_subdirectory(fullfat) - add_subdirectory(libmpg123) - add_subdirectory(libsamplerate) -Index: subsystems/win32/csrsrv/init.c -=================================================================== ---- subsystems/win32/csrsrv/init.c (revision 69519) -+++ subsystems/win32/csrsrv/init.c (working copy) -@@ -20,7 +20,7 @@ - /* DATA ***********************************************************************/ - - // Debug Flag --ULONG CsrDebug = 0; // 0xFFFFFFFF; -+ULONG CsrDebug = 0xFFFFFFFF; - - HANDLE CsrHeap = NULL; - HANDLE CsrObjectDirectory = NULL; -Index: win32ss/CMakeLists.txt -=================================================================== ---- win32ss/CMakeLists.txt (revision 69519) -+++ win32ss/CMakeLists.txt (working copy) -@@ -10,7 +10,10 @@ - PROJECT(WIN32SS) - - add_subdirectory(drivers) -+add_subdirectory(user/winsrv) - -+if (NOT _ARWINSS_) -+ - if(USE_DIBLIB) - add_subdirectory(gdi/diblib) - endif() -@@ -18,7 +21,6 @@ - add_subdirectory(gdi/gdi32) - add_subdirectory(reactx) - add_subdirectory(user/user32) --add_subdirectory(user/winsrv) - - spec2def(win32k.sys win32k.spec ADD_IMPORTLIB) - -@@ -243,3 +245,4 @@ - add_asm_files(win32ksys_asm sys-stubs.S) - add_library(win32ksys ${win32ksys_asm}) - set_target_properties(win32ksys PROPERTIES LINKER_LANGUAGE "C") -+endif() # _ARWINSS_ -\ No newline at end of file -Index: win32ss/drivers/CMakeLists.txt -=================================================================== ---- win32ss/drivers/CMakeLists.txt (revision 69519) -+++ win32ss/drivers/CMakeLists.txt (working copy) -@@ -1,6 +1,8 @@ - - add_subdirectory(displays) -+if (NOT _ARWINSS_) - add_subdirectory(font) -+endif () - add_subdirectory(miniport) - add_subdirectory(videoprt) - add_subdirectory(watchdog) -Index: win32ss/include/ntgdihdl.h -=================================================================== ---- win32ss/include/ntgdihdl.h (revision 69519) -+++ win32ss/include/ntgdihdl.h (working copy) -@@ -260,6 +260,7 @@ - DWORD dwCFCount; - } GDI_SHARED_HANDLE_TABLE, *PGDI_SHARED_HANDLE_TABLE; - -+#ifndef _ARWINSS_ - typedef struct _RGN_ATTR - { - ULONG AttrFlags; -@@ -347,6 +348,19 @@ - RGN_ATTR VisRectRegion; - } DC_ATTR, *PDC_ATTR; - -+#else -+ -+typedef struct _DC_ATTR -+{ -+ HDC hdc; -+ HDC hKernelDC; -+ RECT dc_rect; /* DC rectangle relative to drawable */ -+ HRGN region; /* Device region (visible region & clip region) */ -+ int cache_index; /* cache of a currently selected font */ -+} DC_ATTR, *PDC_ATTR; -+ -+#endif -+ - typedef struct _BRUSH_ATTR /* Used with pen too. */ - { - FLONG AttrFlags; -Index: win32ss/user/winsrv/consrv/conoutput.c -=================================================================== ---- win32ss/user/winsrv/consrv/conoutput.c (revision 69519) -+++ win32ss/user/winsrv/consrv/conoutput.c (working copy) -@@ -99,9 +99,13 @@ - * Indeed, the palette handle comes from a console app - * calling ourselves, running in CSRSS. - */ -+#ifndef _ARWINSS_ - NtUserConsoleControl(ConsoleMakePalettePublic, - &SetPaletteRequest->PaletteHandle, - sizeof(SetPaletteRequest->PaletteHandle)); -+#else -+ UNIMPLEMENTED; -+#endif - - Status = ConDrvSetConsolePalette(Buffer->Header.Console, - Buffer, -Index: win32ss/user/winsrv/consrv/frontends/gui/conwnd.c -=================================================================== ---- win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (revision 69519) -+++ win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (working copy) -@@ -159,7 +159,11 @@ - } - else - { -+#ifndef _ARWINSS_ - NtUserConsoleControl(GuiConsoleWndClassAtom, &WndClassAtom, sizeof(ATOM)); -+#else -+ UNIMPLEMENTED; -+#endif - } - - return (WndClassAtom != 0); -Index: win32ss/user/winsrv/consrv/frontends/gui/guiterm.c -=================================================================== ---- win32ss/user/winsrv/consrv/frontends/gui/guiterm.c (revision 69519) -+++ win32ss/user/winsrv/consrv/frontends/gui/guiterm.c (working copy) -@@ -160,9 +160,14 @@ - /* Assign this console input thread to this desktop */ - DesktopConsoleThreadInfo.DesktopHandle = GuiInitInfo->Desktop; // Duplicated desktop handle - DesktopConsoleThreadInfo.ThreadId = InputThreadId; -+#ifndef _ARWINSS_ - Status = NtUserConsoleControl(ConsoleCtrlDesktopConsoleThread, - &DesktopConsoleThreadInfo, - sizeof(DesktopConsoleThreadInfo)); -+#else -+ UNIMPLEMENTED; -+ Status = STATUS_UNSUCCESSFUL; -+#endif - if (!NT_SUCCESS(Status)) goto Quit; - - /* Connect this CSR thread to the USER subsystem */ -@@ -295,13 +300,17 @@ - - Quit: - DPRINT("CONSRV: Quit the Input Thread 0x%p, Status = 0x%08lx\n", InputThreadId, Status); -- -+ - /* Remove this console input thread from this desktop */ - // DesktopConsoleThreadInfo.DesktopHandle; - DesktopConsoleThreadInfo.ThreadId = 0; -+#ifndef _ARWINSS_ - NtUserConsoleControl(ConsoleCtrlDesktopConsoleThread, - &DesktopConsoleThreadInfo, - sizeof(DesktopConsoleThreadInfo)); -+#else -+ UNIMPLEMENTED -+#endif - - /* Close the duplicated desktop handle */ - CloseDesktop(DesktopConsoleThreadInfo.DesktopHandle); // NtUserCloseDesktop -@@ -358,11 +367,16 @@ - { - RtlInitUnicodeString(&DesktopPath, L"Default"); - } -- -+#ifndef _ARWINSS_ - hDesk = NtUserResolveDesktop(ConsoleLeaderProcessHandle, - &DesktopPath, - 0, - &hWinSta); -+#else -+ UNIMPLEMENTED -+ hDesk = NULL; -+#endif -+ - DPRINT("NtUserResolveDesktop(DesktopPath = '%wZ') returned hDesk = 0x%p; hWinSta = 0x%p\n", - &DesktopPath, hDesk, hWinSta); - -Index: win32ss/user/winsrv/usersrv/init.c -=================================================================== ---- win32ss/user/winsrv/usersrv/init.c (revision 69519) -+++ win32ss/user/winsrv/usersrv/init.c (working copy) -@@ -101,7 +101,20 @@ - NTAPI - CreateSystemThreads(PVOID pParam) - { -+#ifndef _ARWINSS_ - NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); -+#else -+ DWORD WaitRes; -+ HANDLE hDummyEvent; -+ -+ hDummyEvent = CreateEventW(0, FALSE, FALSE, L""); -+ -+ while (TRUE) -+ { -+ WaitRes = WaitForSingleObject(hDummyEvent, INFINITE); -+ } -+ DPRINT1("WaitRes: 0x%x\n", WaitRes); -+#endif - DPRINT1("This thread should not terminate!\n"); - return 0; - } -@@ -173,6 +186,7 @@ - CsrApiPort = CsrQueryApiPort(); - - /* Inform win32k about the API port */ -+#ifndef _ARWINSS_ - Status = NtUserSetInformationThread(NtCurrentThread(), - UserThreadCsrApiPort, - &CsrApiPort, -@@ -181,6 +195,9 @@ - { - return Status; - } -+#else -+ UNIMPLEMENTED -+#endif - } - - /* Check connection info validity */ -@@ -199,9 +216,14 @@ - - /* Pass the request to win32k */ - ConnectInfo->dwDispatchCount = 0; // gDispatchTableValues; -+#ifndef _ARWINSS_ - Status = NtUserProcessConnect(CsrProcess->ProcessHandle, - ConnectInfo, - *ConnectionInfoLength); -+#else -+ Status = STATUS_SUCCESS; -+ UNIMPLEMENTED -+#endif - - return Status; - } -@@ -254,7 +276,11 @@ - } - - /* Set the process creation notify routine for BASE */ -+#ifndef _ARWINSS_ - BaseSetProcessCreateNotify(NtUserNotifyProcessCreate); -+#else -+ UNIMPLEMENTED -+#endif - - /* Initialize the kernel mode subsystem */ - Status = NtUserInitialize(USER_VERSION, -Index: win32ss/user/winsrv/usersrv/shutdown.c -=================================================================== ---- win32ss/user/winsrv/usersrv/shutdown.c (revision 69519) -+++ win32ss/user/winsrv/usersrv/shutdown.c (working copy) -@@ -381,7 +381,12 @@ - static BOOLEAN - IsConsoleMode(VOID) - { -+#ifndef _ARWINSS_ - return (BOOLEAN)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE); -+#else -+ UNIMPLEMENTED -+ return FALSE; -+#endif - } - - -@@ -678,9 +683,14 @@ - while (TRUE) - { - /* Notify Win32k and potentially Winlogon of the shutdown */ -+#ifndef _ARWINSS_ - Status = NtUserSetInformationThread(CsrThread->ThreadHandle, - UserThreadInitiateShutdown, - &Flags, sizeof(Flags)); -+#else -+ Status = STATUS_SUCCESS; -+ UNIMPLEMENTED -+#endif - DPRINT1("Win32k says: %lx\n", Status); - switch (Status) - { -@@ -736,9 +746,13 @@ - // FIXME: If Status == STATUS_CANCELLED, call RecordShutdownReason - - /* Tell Win32k and potentially Winlogon that we're done */ -+#ifndef _ARWINSS_ - NtUserSetInformationThread(CsrThread->ThreadHandle, - UserThreadEndShutdown, - &Status, sizeof(Status)); -+#else -+ UNIMPLEMENTED -+#endif - - DPRINT1("SrvExitWindowsEx returned 0x%08x\n", Status); -
Modified: branches/arwinss/trunk.diff URL: http://svn.reactos.org/svn/reactos/branches/arwinss/trunk.diff?rev=69530&... ============================================================================== --- branches/arwinss/trunk.diff [iso-8859-1] (original) +++ branches/arwinss/trunk.diff [iso-8859-1] Wed Oct 14 20:29:45 2015 @@ -1,297 +1,655 @@ -Index: base/shell/explorer/desktop/desktop.cpp -=================================================================== ---- base/shell/explorer/desktop/desktop.cpp (revision 62758) -+++ base/shell/explorer/desktop/desktop.cpp (working copy) -@@ -326,8 +326,8 @@ - HWND DesktopWindow::Create() - { - static IconWindowClass wcDesktop(TEXT("Progman"), IDI_REACTOS, CS_DBLCLKS); -- /* (disabled because of small ugly temporary artefacts when hiding start menu) -- wcDesktop.hbrBackground = (HBRUSH)(COLOR_BACKGROUND+1); */ -+ /* (disabled because of small ugly temporary artefacts when hiding start menu) */ -+ wcDesktop.hbrBackground = (HBRUSH)(COLOR_BACKGROUND+1); - - int width = GetSystemMetrics(SM_CXSCREEN); - int height = GetSystemMetrics(SM_CYSCREEN); +Index: base/system/smss/smsubsys.c +=================================================================== +--- base/system/smss/smsubsys.c (revision 69519) ++++ base/system/smss/smsubsys.c (working copy) +@@ -10,7 +10,7 @@ + + #include "smss.h" + +-#define NDEBUG ++//#define NDEBUG + #include <debug.h> + + /* GLOBALS ********************************************************************/ +Index: base/system/winlogon/winlogon.c +=================================================================== +--- base/system/winlogon/winlogon.c (revision 69519) ++++ base/system/winlogon/winlogon.c (working copy) +@@ -397,7 +397,7 @@ + HandleShutdown(WLSession, WLX_SAS_ACTION_SHUTDOWN_REBOOT); + ExitProcess(1); + } +- ++ERR("WL Desktop: %x\n", WLSession->WinlogonDesktop); + DisplayStatusMessage(WLSession, WLSession->WinlogonDesktop, IDS_REACTOSISSTARTINGUP); + + #if 0 Index: cmake/baseaddress.cmake =================================================================== ---- cmake/baseaddress.cmake (revision 62758) +--- cmake/baseaddress.cmake (revision 69519) +++ cmake/baseaddress.cmake (working copy) -@@ -1,7 +1,7 @@ - set(baseaddress_ntdll 0x7c920000) # should be above 0x7c920000 - set(baseaddress_kernel32 0x77d80000) - set(baseaddress_msvcrt 0x77cd0000) --set(baseaddress_advapi32 0x77c20000) -+set(baseaddress_advapi32 0x77c70000) - set(baseaddress_gdi32 0x77bb0000) - set(baseaddress_user32 0x77a20000) - set(baseaddress_dhcpcsvc 0x779d0000) -@@ -272,6 +272,7 @@ - set(baseaddress_wbemprox 0x70c70000) - set(baseaddress_windowscodecs 0x70b60000) - set(baseaddress_windowscodecsext 0x70b30000) -+set(baseaddress_freetypd 0x709b0000) - set(baseaddress_wined3d 0x70960000) - set(baseaddress_winfax 0x70930000) - set(baseaddress_wing32 0x70900000) +@@ -2,7 +2,7 @@ + set(baseaddress_kernel32 0x7c770000) + set(baseaddress_msvcrt 0x7c6c0000) + set(baseaddress_advapi32 0x7c610000) +-set(baseaddress_gdi32 0x7c570000) ++set(baseaddress_gdi32 0x7c580000) + set(baseaddress_user32 0x7c3d0000) + set(baseaddress_dhcpcsvc 0x7c380000) + set(baseaddress_dnsapi 0x7c330000) Index: cmake/config.cmake =================================================================== ---- cmake/config.cmake (revision 62758) +--- cmake/config.cmake (revision 69519) +++ cmake/config.cmake (working copy) @@ -58,6 +58,9 @@ - "Whether to compile support for ELF files. - Do not enable unless you know what you're doing.") - -+set(_ARWINSS_ TRUE CACHE BOOL -+"Whether to build and use Wine-based Win32 subsystem.") -+ - set(NSWPAT FALSE CACHE BOOL - "Whether to build apps/libs with features covered by software patents. - If you live in a country where software patents are valid/apply, don't + "Whether to compile support for ELF files. + Do not enable unless you know what you're doing.") + ++set(_ARWINSS_ TRUE CACHE BOOL ++"Whether to build and use Wine-based Win32 subsystem.") ++ + set(NSWPAT FALSE CACHE BOOL + "Whether to build apps/libs with features covered by software patents. + If you live in a country where software patents are valid/apply, don't Index: CMakeLists.txt =================================================================== ---- CMakeLists.txt (revision 62758) +--- CMakeLists.txt (revision 69519) +++ CMakeLists.txt (working copy) -@@ -134,6 +134,10 @@ - add_definitions(-D_WINKD_=1) - endif() - -+ if(_ARWINSS_) -+ add_definitions(-D_ARWINSS_=1) -+ endif() -+ - if((NOT DEFINED PCH) AND (CMAKE_VERSION STREQUAL "2.8.12.1-ReactOS") AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")) - set(PCH 1) - else() -@@ -236,6 +240,9 @@ - add_subdirectory(subsystems) - add_subdirectory(tools/wpp) - add_subdirectory(win32ss) -+ if (_ARWINSS_) -+ add_subdirectory(arwinss) -+ endif() - - # Create {bootcd, livecd, bootcdregtest}.lst - create_iso_lists() +@@ -166,6 +166,10 @@ + add_definitions(-D_WINKD_=1) + endif() + ++ if(_ARWINSS_) ++ add_definitions(-D_ARWINSS_=1) ++ endif() ++ + if(CMAKE_VERSION MATCHES "ReactOS") + set(PCH 1 CACHE BOOL "Whether to use precompiled headers") + else() +@@ -279,6 +283,9 @@ + add_subdirectory(subsystems) + add_subdirectory(tools/wpp) + add_subdirectory(win32ss) ++ if (_ARWINSS_) ++ add_subdirectory(arwinss) ++ endif() + + # Create the registry hives + create_registry_hives() +Index: dll/win32/kernel32/client/dllmain.c +=================================================================== +--- dll/win32/kernel32/client/dllmain.c (revision 69519) ++++ dll/win32/kernel32/client/dllmain.c (working copy) +@@ -131,7 +131,7 @@ + SessionId, + WIN_OBJ_DIR); + } +- ++DPRINT1("About to connect to CSR!\n"); + /* Connect to the Base Server */ + Status = CsrClientConnectToServer(SessionDir, + BASESRV_SERVERDLL_INDEX, +Index: dll/win32/msgina/gui.c +=================================================================== +--- dll/win32/msgina/gui.c (revision 69519) ++++ dll/win32/msgina/gui.c (working copy) +@@ -73,6 +73,7 @@ + + /* When SetThreadDesktop is called the system closes the desktop handle when needed + so we have to create a new handle because this handle may still be in use by winlogon */ ++#ifndef _ARWINSS_ + if (!DuplicateHandle ( GetCurrentProcess(), + msg->hDesktop, + GetCurrentProcess(), +@@ -85,6 +86,9 @@ + HeapFree(GetProcessHeap(), 0, lpParam); + return FALSE; + } ++#else ++ hDesk = msg->hDesktop; ++#endif + + if(!SetThreadDesktop(hDesk)) + { Index: include/asm/syscalls.inc =================================================================== ---- include/asm/syscalls.inc (revision 62758) +--- include/asm/syscalls.inc (revision 69519) +++ include/asm/syscalls.inc (working copy) -@@ -95,6 +95,7 @@ - - MACRO(STUB_U, Name, ArgCount) - MAKE_LABEL Zw&Name, %ArgCount * 4 +@@ -1,4 +1,4 @@ +- ++ + #ifdef _M_ARM + + #include <ksarm.h> +@@ -52,103 +52,105 @@ + + SyscallId = 0 + +-#ifdef _M_IX86 +-#define KUSER_SHARED_SYSCALL HEX(7ffe0300) +-#define KGDT_R0_CODE 8 +-MACRO(STUBCODE_U, Name, SyscallId, ArgCount) +- StackBytes = 4 * ArgCount +- FPO 0, 0, 0, 0, 0, FRAME_FPO +- mov eax, SyscallId ++#ifdef _M_IX86 ++#define KUSER_SHARED_SYSCALL HEX(7ffe0300) ++#define KGDT_R0_CODE 8 ++MACRO(STUBCODE_U, Name, SyscallId, ArgCount) ++ StackBytes = 4 * ArgCount ++ FPO 0, 0, 0, 0, 0, FRAME_FPO ++ mov eax, SyscallId + mov edx, KUSER_SHARED_SYSCALL + call dword ptr [edx] +- ret StackBytes +-ENDM +-MACRO(STUBCODE_K, Name, SyscallId, ArgCount) +- StackBytes = 4 * &ArgCount +- FPO 0, 0, 0, 0, 0, FRAME_FPO +- mov eax, SyscallId +- lea edx, [esp + 4] +- pushfd +- push KGDT_R0_CODE +- call _KiSystemService +- ret StackBytes +-ENDM +-#elif defined(_M_AMD64) +-MACRO(STUBCODE_U, Name, SyscallId, ArgCount) +- .ENDPROLOG +- mov eax, SyscallId +- mov r10, rcx +- syscall +- ret +-ENDM +-MACRO(STUBCODE_K, Name, SyscallId, ArgCount) +- .ENDPROLOG +- EXTERN Nt&Name:PROC +- lea rax, Nt&Name[rip] +- mov r10, ArgCount * 8 +- jmp KiZwSystemService +-ENDM +-#elif defined(_M_PPC) +-MACRO(STUBCODE_U, Name, SyscallId, ArgCount) +- stwu 1,-16(1) +- mflr 0 +- stw 0,0(1) +- li 0, SyscallId +- sc +- lwz 0,0(1) +- mtlr 0 +- addi 1,1,16 +- blr +-ENDM +-#define STUBCODE_K STUBCODE_U +-#elif defined(_M_MIPS) +-MACRO(STUBCODE_U, Name, SyscallId, ArgCount) +- li $8, KUSER_SHARED_SYSCALL +- lw $8,0($8) +- j $8 +- nop +-ENDM +-MACRO(STUBCODE_K, Name, SyscallId, ArgCount) +- j KiSystemService +- nop +-ENDM +-#else +-#error unsupported architecture +-#endif ++ ret StackBytes ++ENDM ++MACRO(STUBCODE_K, Name, SyscallId, ArgCount) ++ StackBytes = 4 * &ArgCount ++ FPO 0, 0, 0, 0, 0, FRAME_FPO ++ mov eax, SyscallId ++ lea edx, [esp + 4] ++ pushfd ++ push KGDT_R0_CODE ++ call _KiSystemService ++ ret StackBytes ++ENDM ++#elif defined(_M_AMD64) ++MACRO(STUBCODE_U, Name, SyscallId, ArgCount) ++ .ENDPROLOG ++ mov eax, SyscallId ++ mov r10, rcx ++ syscall ++ ret ++ENDM ++MACRO(STUBCODE_K, Name, SyscallId, ArgCount) ++ .ENDPROLOG ++ EXTERN Nt&Name:PROC ++ lea rax, Nt&Name[rip] ++ mov r10, ArgCount * 8 ++ jmp KiZwSystemService ++ENDM ++#elif defined(_M_PPC) ++MACRO(STUBCODE_U, Name, SyscallId, ArgCount) ++ stwu 1,-16(1) ++ mflr 0 ++ stw 0,0(1) ++ li 0, SyscallId ++ sc ++ lwz 0,0(1) ++ mtlr 0 ++ addi 1,1,16 ++ blr ++ENDM ++#define STUBCODE_K STUBCODE_U ++#elif defined(_M_MIPS) ++MACRO(STUBCODE_U, Name, SyscallId, ArgCount) ++ li $8, KUSER_SHARED_SYSCALL ++ lw $8,0($8) ++ j $8 ++ nop ++ENDM ++MACRO(STUBCODE_K, Name, SyscallId, ArgCount) ++ j KiSystemService ++ nop ++ENDM ++#else ++#error unsupported architecture ++#endif ++ ++#ifdef _M_IX86 ++MACRO(MAKE_LABEL, Name, StackBytes) ++ PUBLIC _&Name&@&StackBytes ++ _&Name&@&StackBytes: ++ENDM ++MACRO(START_PROC, Name, StackBytes) ++ PUBLIC _&Name&@&StackBytes ++ .PROC _&Name&@&StackBytes ++ENDM ++#else ++MACRO(MAKE_LABEL, Name, StackBytes) ++ PUBLIC &Name ++ &Name: ++ENDM ++MACRO(START_PROC, Name, StackBytes) ++ PUBLIC &Name ++ .PROC &Name ++ENDM ++#endif ++ ++MACRO(STUB_U, Name, ArgCount) ++ MAKE_LABEL Zw&Name, %ArgCount * 4 + MAKE_LABEL Name, %ArgCount * 4 - START_PROC Nt&Name, %ArgCount * 4 - STUBCODE_U Name, SyscallId, %ArgCount - .ENDP -@@ -102,6 +103,7 @@ - ENDM - - MACRO(STUB_K, Name, ArgCount) ++ START_PROC Nt&Name, %ArgCount * 4 ++ STUBCODE_U Name, SyscallId, %ArgCount ++ .ENDP ++ SyscallId = SyscallId + 1 ++ENDM ++ ++MACRO(STUB_K, Name, ArgCount) + MAKE_LABEL Name, %ArgCount * 4 - START_PROC Zw&Name, %ArgCount * 4 - STUBCODE_K Name, SyscallId, %ArgCount - .ENDP ++ START_PROC Zw&Name, %ArgCount * 4 ++ STUBCODE_K Name, SyscallId, %ArgCount ++ .ENDP ++ SyscallId = SyscallId + 1 ++ENDM + +-#ifdef _M_IX86 +-MACRO(MAKE_LABEL, Name, StackBytes) +- PUBLIC _&Name&@&StackBytes +- _&Name&@&StackBytes: +-ENDM +-MACRO(START_PROC, Name, StackBytes) +- PUBLIC _&Name&@&StackBytes +- .PROC _&Name&@&StackBytes +-ENDM +-#else +-MACRO(MAKE_LABEL, Name, StackBytes) +- PUBLIC &Name +- &Name: +-ENDM +-MACRO(START_PROC, Name, StackBytes) +- PUBLIC &Name +- .PROC &Name +-ENDM + #endif +- +-MACRO(STUB_U, Name, ArgCount) +- MAKE_LABEL Zw&Name, %ArgCount * 4 +- START_PROC Nt&Name, %ArgCount * 4 +- STUBCODE_U Name, SyscallId, %ArgCount +- .ENDP +- SyscallId = SyscallId + 1 +-ENDM +- +-MACRO(STUB_K, Name, ArgCount) +- START_PROC Zw&Name, %ArgCount * 4 +- STUBCODE_K Name, SyscallId, %ArgCount +- .ENDP +- SyscallId = SyscallId + 1 +-ENDM +- +-#endif Index: include/psdk/winddi.h =================================================================== ---- include/psdk/winddi.h (revision 62758) +--- include/psdk/winddi.h (revision 69519) +++ include/psdk/winddi.h (working copy) -@@ -2683,7 +2683,7 @@ - _In_ ULONG cjSize, - _Out_bytecap_(cjSize) FONTINFO *pfi); - --#if (NTDDI_VERSION <= NTDDI_WINXP) -+#if 0//(NTDDI_VERSION <= NTDDI_WINXP) - GAMMA_TABLES* - APIENTRY - FONTOBJ_pGetGammaTables( +@@ -2911,7 +2911,7 @@ + _In_ ULONG cjSize, + _Out_bytecap_(cjSize) FONTINFO *pfi); + +-#if (NTDDI_VERSION <= NTDDI_WINXP) ++#if 0//(NTDDI_VERSION <= NTDDI_WINXP) + /* Obsolete in Windows 2000 and later */ + GAMMA_TABLES* + APIENTRY Index: include/reactos/wine/config.h =================================================================== ---- include/reactos/wine/config.h (revision 62758) +--- include/reactos/wine/config.h (revision 69519) +++ include/reactos/wine/config.h (working copy) @@ -1,3 +1,5 @@ -+#include "reactos/buildno.h" -+ - #define __WINE_CONFIG_H - - /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ ++#include "reactos/buildno.h" ++ + #define __WINE_CONFIG_H + + /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ Index: lib/3rdparty/CMakeLists.txt =================================================================== ---- lib/3rdparty/CMakeLists.txt (revision 62758) +--- lib/3rdparty/CMakeLists.txt (revision 69519) +++ lib/3rdparty/CMakeLists.txt (working copy) @@ -2,7 +2,9 @@ - add_subdirectory(adns) - add_subdirectory(bzip2) - add_subdirectory(cardlib) -+if (NOT _ARWINSS_) - add_subdirectory(freetype) -+endif () - add_subdirectory(fullfat) - add_subdirectory(libmpg123) - add_subdirectory(libsamplerate) + add_subdirectory(adns) + add_subdirectory(bzip2) + add_subdirectory(cardlib) ++if (NOT _ARWINSS_) + add_subdirectory(freetype) ++endif () + add_subdirectory(fullfat) + add_subdirectory(libmpg123) + add_subdirectory(libsamplerate) Index: subsystems/win32/csrsrv/init.c =================================================================== ---- subsystems/win32/csrsrv/init.c (revision 62758) +--- subsystems/win32/csrsrv/init.c (revision 69519) +++ subsystems/win32/csrsrv/init.c (working copy) @@ -20,7 +20,7 @@ - /* DATA ***********************************************************************/ - - // Debug Flag --ULONG CsrDebug = 0; // 0xFFFFFFFF; -+ULONG CsrDebug = 0xFFFFFFFF; - - HANDLE CsrHeap = NULL; - HANDLE CsrObjectDirectory = NULL; + /* DATA ***********************************************************************/ + + // Debug Flag +-ULONG CsrDebug = 0; // 0xFFFFFFFF; ++ULONG CsrDebug = 0xFFFFFFFF; + + HANDLE CsrHeap = NULL; + HANDLE CsrObjectDirectory = NULL; Index: win32ss/CMakeLists.txt =================================================================== ---- win32ss/CMakeLists.txt (revision 62758) +--- win32ss/CMakeLists.txt (revision 69519) +++ win32ss/CMakeLists.txt (working copy) -@@ -6,7 +6,10 @@ - PROJECT(WIN32SS) - - add_subdirectory(drivers) -+add_subdirectory(user/winsrv) - -+if (NOT _ARWINSS_) -+ - if(USE_DIBLIB) - add_subdirectory(gdi/diblib) - endif() +@@ -10,7 +10,10 @@ + PROJECT(WIN32SS) + + add_subdirectory(drivers) ++add_subdirectory(user/winsrv) + ++if (NOT _ARWINSS_) ++ + if(USE_DIBLIB) + add_subdirectory(gdi/diblib) + endif() @@ -18,7 +21,6 @@ - add_subdirectory(gdi/gdi32) - add_subdirectory(reactx) - add_subdirectory(user/user32) --add_subdirectory(user/winsrv) - - spec2def(win32k.sys win32k.spec ADD_IMPORTLIB) - + add_subdirectory(gdi/gdi32) + add_subdirectory(reactx) + add_subdirectory(user/user32) +-add_subdirectory(user/winsrv) + + spec2def(win32k.sys win32k.spec ADD_IMPORTLIB) + @@ -243,3 +245,4 @@ - add_asm_files(win32ksys_asm sys-stubs.S) - add_library(win32ksys ${win32ksys_asm}) - set_target_properties(win32ksys PROPERTIES LINKER_LANGUAGE "C") + add_asm_files(win32ksys_asm sys-stubs.S) + add_library(win32ksys ${win32ksys_asm}) + set_target_properties(win32ksys PROPERTIES LINKER_LANGUAGE "C") +endif() # _ARWINSS_ \ No newline at end of file Index: win32ss/drivers/CMakeLists.txt =================================================================== ---- win32ss/drivers/CMakeLists.txt (revision 62758) +--- win32ss/drivers/CMakeLists.txt (revision 69519) +++ win32ss/drivers/CMakeLists.txt (working copy) @@ -1,6 +1,8 @@ - - add_subdirectory(displays) -+if (NOT _ARWINSS_) - add_subdirectory(font) -+endif () - add_subdirectory(miniport) - add_subdirectory(videoprt) - add_subdirectory(watchdog) + + add_subdirectory(displays) ++if (NOT _ARWINSS_) + add_subdirectory(font) ++endif () + add_subdirectory(miniport) + add_subdirectory(videoprt) + add_subdirectory(watchdog) Index: win32ss/include/ntgdihdl.h =================================================================== ---- win32ss/include/ntgdihdl.h (revision 62758) +--- win32ss/include/ntgdihdl.h (revision 69519) +++ win32ss/include/ntgdihdl.h (working copy) -@@ -270,6 +270,7 @@ - DWORD dwCFCount; - } GDI_SHARED_HANDLE_TABLE, *PGDI_SHARED_HANDLE_TABLE; - -+#ifndef _ARWINSS_ - typedef struct _RGN_ATTR - { - ULONG AttrFlags; -@@ -357,6 +358,19 @@ - RGN_ATTR VisRectRegion; - } DC_ATTR, *PDC_ATTR; - -+#else -+ -+typedef struct _DC_ATTR -+{ -+ HDC hdc; -+ HDC hKernelDC; -+ RECT dc_rect; /* DC rectangle relative to drawable */ -+ HRGN region; /* Device region (visible region & clip region) */ -+ int cache_index; /* cache of a currently selected font */ -+} DC_ATTR, *PDC_ATTR; -+ -+#endif -+ - typedef struct _BRUSH_ATTR /* Used with pen too. */ - { - FLONG AttrFlags; +@@ -260,6 +260,7 @@ + DWORD dwCFCount; + } GDI_SHARED_HANDLE_TABLE, *PGDI_SHARED_HANDLE_TABLE; + ++#ifndef _ARWINSS_ + typedef struct _RGN_ATTR + { + ULONG AttrFlags; +@@ -347,6 +348,19 @@ + RGN_ATTR VisRectRegion; + } DC_ATTR, *PDC_ATTR; + ++#else ++ ++typedef struct _DC_ATTR ++{ ++ HDC hdc; ++ HDC hKernelDC; ++ RECT dc_rect; /* DC rectangle relative to drawable */ ++ HRGN region; /* Device region (visible region & clip region) */ ++ int cache_index; /* cache of a currently selected font */ ++} DC_ATTR, *PDC_ATTR; ++ ++#endif ++ + typedef struct _BRUSH_ATTR /* Used with pen too. */ + { + FLONG AttrFlags; Index: win32ss/user/winsrv/consrv/conoutput.c =================================================================== ---- win32ss/user/winsrv/consrv/conoutput.c (revision 62758) +--- win32ss/user/winsrv/consrv/conoutput.c (revision 69519) +++ win32ss/user/winsrv/consrv/conoutput.c (working copy) -@@ -77,9 +77,13 @@ - * Indeed, the palette handle comes from a console app - * calling ourselves, running in CSRSS. - */ -+#ifndef _ARWINSS_ - NtUserConsoleControl(ConsoleMakePalettePublic, - &SetPaletteRequest->PaletteHandle, - sizeof(SetPaletteRequest->PaletteHandle)); -+#else -+ UNIMPLEMENTED; -+#endif - - Status = ConDrvSetConsolePalette(Buffer->Header.Console, - Buffer, +@@ -99,9 +99,13 @@ + * Indeed, the palette handle comes from a console app + * calling ourselves, running in CSRSS. + */ ++#ifndef _ARWINSS_ + NtUserConsoleControl(ConsoleMakePalettePublic, + &SetPaletteRequest->PaletteHandle, + sizeof(SetPaletteRequest->PaletteHandle)); ++#else ++ UNIMPLEMENTED; ++#endif + + Status = ConDrvSetConsolePalette(Buffer->Header.Console, + Buffer, Index: win32ss/user/winsrv/consrv/frontends/gui/conwnd.c =================================================================== ---- win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (revision 62758) +--- win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (revision 69519) +++ win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (working copy) -@@ -161,7 +161,11 @@ - } - else - { -+#ifndef _ARWINSS_ - NtUserConsoleControl(GuiConsoleWndClassAtom, &WndClassAtom, sizeof(ATOM)); -+#else -+ UNIMPLEMENTED; -+#endif - } - - return (WndClassAtom != 0); +@@ -159,7 +159,11 @@ + } + else + { ++#ifndef _ARWINSS_ + NtUserConsoleControl(GuiConsoleWndClassAtom, &WndClassAtom, sizeof(ATOM)); ++#else ++ UNIMPLEMENTED; ++#endif + } + + return (WndClassAtom != 0); +Index: win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +=================================================================== +--- win32ss/user/winsrv/consrv/frontends/gui/guiterm.c (revision 69519) ++++ win32ss/user/winsrv/consrv/frontends/gui/guiterm.c (working copy) +@@ -160,9 +160,14 @@ + /* Assign this console input thread to this desktop */ + DesktopConsoleThreadInfo.DesktopHandle = GuiInitInfo->Desktop; // Duplicated desktop handle + DesktopConsoleThreadInfo.ThreadId = InputThreadId; ++#ifndef _ARWINSS_ + Status = NtUserConsoleControl(ConsoleCtrlDesktopConsoleThread, + &DesktopConsoleThreadInfo, + sizeof(DesktopConsoleThreadInfo)); ++#else ++ UNIMPLEMENTED; ++ Status = STATUS_UNSUCCESSFUL; ++#endif + if (!NT_SUCCESS(Status)) goto Quit; + + /* Connect this CSR thread to the USER subsystem */ +@@ -295,13 +300,17 @@ + + Quit: + DPRINT("CONSRV: Quit the Input Thread 0x%p, Status = 0x%08lx\n", InputThreadId, Status); +- ++ + /* Remove this console input thread from this desktop */ + // DesktopConsoleThreadInfo.DesktopHandle; + DesktopConsoleThreadInfo.ThreadId = 0; ++#ifndef _ARWINSS_ + NtUserConsoleControl(ConsoleCtrlDesktopConsoleThread, + &DesktopConsoleThreadInfo, + sizeof(DesktopConsoleThreadInfo)); ++#else ++ UNIMPLEMENTED ++#endif + + /* Close the duplicated desktop handle */ + CloseDesktop(DesktopConsoleThreadInfo.DesktopHandle); // NtUserCloseDesktop +@@ -358,11 +367,16 @@ + { + RtlInitUnicodeString(&DesktopPath, L"Default"); + } +- ++#ifndef _ARWINSS_ + hDesk = NtUserResolveDesktop(ConsoleLeaderProcessHandle, + &DesktopPath, + 0, + &hWinSta); ++#else ++ UNIMPLEMENTED ++ hDesk = NULL; ++#endif ++ + DPRINT("NtUserResolveDesktop(DesktopPath = '%wZ') returned hDesk = 0x%p; hWinSta = 0x%p\n", + &DesktopPath, hDesk, hWinSta); + Index: win32ss/user/winsrv/usersrv/init.c =================================================================== ---- win32ss/user/winsrv/usersrv/init.c (revision 62758) +--- win32ss/user/winsrv/usersrv/init.c (revision 69519) +++ win32ss/user/winsrv/usersrv/init.c (working copy) -@@ -95,7 +95,9 @@ - WINAPI - PrivateCsrssManualGuiCheck(LONG Check) - { -+#ifndef _ARWINSS_ - NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK); -+#endif - } - - ULONG -@@ -102,7 +104,13 @@ - NTAPI - CreateSystemThreads(PVOID pParam) - { -+#ifndef _ARWINSS_ - NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); -+#else -+ while (TRUE) -+ { -+ } -+#endif - DPRINT1("This thread should not terminate!\n"); - return 0; - } +@@ -101,7 +101,20 @@ + NTAPI + CreateSystemThreads(PVOID pParam) + { ++#ifndef _ARWINSS_ + NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); ++#else ++ DWORD WaitRes; ++ HANDLE hDummyEvent; ++ ++ hDummyEvent = CreateEventW(0, FALSE, FALSE, L""); ++ ++ while (TRUE) ++ { ++ WaitRes = WaitForSingleObject(hDummyEvent, INFINITE); ++ } ++ DPRINT1("WaitRes: 0x%x\n", WaitRes); ++#endif + DPRINT1("This thread should not terminate!\n"); + return 0; + } +@@ -173,6 +186,7 @@ + CsrApiPort = CsrQueryApiPort(); + + /* Inform win32k about the API port */ ++#ifndef _ARWINSS_ + Status = NtUserSetInformationThread(NtCurrentThread(), + UserThreadCsrApiPort, + &CsrApiPort, +@@ -181,6 +195,9 @@ + { + return Status; + } ++#else ++ UNIMPLEMENTED ++#endif + } + + /* Check connection info validity */ +@@ -199,9 +216,14 @@ + + /* Pass the request to win32k */ + ConnectInfo->dwDispatchCount = 0; // gDispatchTableValues; ++#ifndef _ARWINSS_ + Status = NtUserProcessConnect(CsrProcess->ProcessHandle, + ConnectInfo, + *ConnectionInfoLength); ++#else ++ Status = STATUS_SUCCESS; ++ UNIMPLEMENTED ++#endif + + return Status; + } +@@ -254,7 +276,11 @@ + } + + /* Set the process creation notify routine for BASE */ ++#ifndef _ARWINSS_ + BaseSetProcessCreateNotify(NtUserNotifyProcessCreate); ++#else ++ UNIMPLEMENTED ++#endif + + /* Initialize the kernel mode subsystem */ + Status = NtUserInitialize(USER_VERSION, Index: win32ss/user/winsrv/usersrv/shutdown.c =================================================================== ---- win32ss/user/winsrv/usersrv/shutdown.c (revision 62758) +--- win32ss/user/winsrv/usersrv/shutdown.c (revision 69519) +++ win32ss/user/winsrv/usersrv/shutdown.c (working copy) -@@ -901,7 +901,11 @@ - NTSTATUS Status; - - /* FIXME Inside 2000 says we should impersonate the caller here */ -+#ifndef _ARWINSS_ - Status = NtUserCallTwoParam(UserProcessId, Flags, TWOPARAM_ROUTINE_EXITREACTOS); -+#else -+ Status = 0; -+#endif - - /* If the message isn't handled, the return value is 0, so 0 doesn't indicate - success. Success is indicated by a 1 return value, if anything besides 0 +@@ -381,7 +381,12 @@ + static BOOLEAN + IsConsoleMode(VOID) + { ++#ifndef _ARWINSS_ + return (BOOLEAN)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE); ++#else ++ UNIMPLEMENTED ++ return FALSE; ++#endif + } + + +@@ -678,9 +683,14 @@ + while (TRUE) + { + /* Notify Win32k and potentially Winlogon of the shutdown */ ++#ifndef _ARWINSS_ + Status = NtUserSetInformationThread(CsrThread->ThreadHandle, + UserThreadInitiateShutdown, + &Flags, sizeof(Flags)); ++#else ++ Status = STATUS_SUCCESS; ++ UNIMPLEMENTED ++#endif + DPRINT1("Win32k says: %lx\n", Status); + switch (Status) + { +@@ -736,9 +746,13 @@ + // FIXME: If Status == STATUS_CANCELLED, call RecordShutdownReason + + /* Tell Win32k and potentially Winlogon that we're done */ ++#ifndef _ARWINSS_ + NtUserSetInformationThread(CsrThread->ThreadHandle, + UserThreadEndShutdown, + &Status, sizeof(Status)); ++#else ++ UNIMPLEMENTED ++#endif + + DPRINT1("SrvExitWindowsEx returned 0x%08x\n", Status); +