Author: fireball Date: Tue Nov 3 22:31:23 2015 New Revision: 69809
URL: http://svn.reactos.org/svn/reactos?rev=69809&view=rev Log: [ARWINSS] - Change base addresses so that user32, gdi32 and kernel32 don't get relocated.
Modified: branches/arwinss/trunk.diff
Modified: branches/arwinss/trunk.diff URL: http://svn.reactos.org/svn/reactos/branches/arwinss/trunk.diff?rev=69809&... ============================================================================== --- branches/arwinss/trunk.diff [iso-8859-1] (original) +++ branches/arwinss/trunk.diff [iso-8859-1] Tue Nov 3 22:31:23 2015 @@ -1,137 +1,139 @@ Index: base/system/smss/smsubsys.c =================================================================== ---- base/system/smss/smsubsys.c (revision 69519) +--- base/system/smss/smsubsys.c (revision 69795) +++ base/system/smss/smsubsys.c (working copy) @@ -10,7 +10,7 @@ - - #include "smss.h" - --#define NDEBUG -+//#define NDEBUG - #include <debug.h> - - /* GLOBALS ********************************************************************/ + + #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 (revision 69795) +++ 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 + 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 (revision 69795) +++ 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) +@@ -2,8 +2,8 @@ + set(baseaddress_kernel32 0x7c750000) + set(baseaddress_msvcrt 0x7c6b0000) + set(baseaddress_advapi32 0x7c610000) +-set(baseaddress_gdi32 0x7c570000) +-set(baseaddress_user32 0x7c3d0000) ++set(baseaddress_gdi32 0x7c530000) ++set(baseaddress_user32 0x7c380000) + set(baseaddress_dhcpcsvc 0x7c380000) + set(baseaddress_dnsapi 0x7c330000) + set(baseaddress_icmp 0x7c300000) Index: cmake/config.cmake =================================================================== ---- cmake/config.cmake (revision 69519) +--- cmake/config.cmake (revision 69795) +++ 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 69519) +--- CMakeLists.txt (revision 69795) +++ 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() +@@ -165,6 +165,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() +@@ -278,6 +282,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 (revision 69795) +++ 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, + 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 (revision 69795) +++ 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(), + + /* 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)) - { + 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 (revision 69795) +++ include/asm/syscalls.inc (working copy) @@ -1,4 +1,4 @@ -- +- + - #ifdef _M_ARM - - #include <ksarm.h> + #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 + + 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 @@ -139,62 +141,62 @@ + 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 + 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) @@ -286,370 +288,372 @@ + .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 + +-#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 (revision 69795) +++ 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 + _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 (revision 69795) +++ 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 69519) +--- lib/3rdparty/CMakeLists.txt (revision 69795) +++ 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 69519) +--- subsystems/win32/csrsrv/init.c (revision 69795) +++ 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 69519) +--- win32ss/CMakeLists.txt (revision 69795) +++ 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() + 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 69519) +--- win32ss/drivers/CMakeLists.txt (revision 69795) +++ 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 69519) +--- win32ss/include/ntgdihdl.h (revision 69795) +++ 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; + 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; + 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 (revision 69795) +++ 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, + * 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 (revision 69795) +++ 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); + } + 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 (revision 69795) +++ 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 */ + /* 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 + + 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); - + { + 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 (revision 69795) +++ 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, +@@ -101,8 +101,22 @@ + NTAPI + CreateSystemThreads(PVOID pParam) + { ++#ifndef _ARWINSS_ + NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); + RtlExitUserThread(0); ++#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 +187,7 @@ + CsrApiPort = CsrQueryApiPort(); + + /* Inform win32k about the API port */ ++#ifndef _ARWINSS_ + Status = NtUserSetInformationThread(NtCurrentThread(), + UserThreadCsrApiPort, + &CsrApiPort, +@@ -181,6 +196,9 @@ + { + return Status; + } ++#else ++ UNIMPLEMENTED ++#endif + } + + /* Check connection info validity */ +@@ -199,9 +217,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 +277,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 (revision 69795) +++ 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 - } - - + 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) - { + 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); - + // 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); +