ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
11 participants
124 discussions
Start a n
N
ew thread
[hbelusca] 57665: [WIN32K] - Remove the now unneeded CSR messaging support. - CsrInit() goes away also and the usage of the CsrProcess is replaced by that of gpepCSRSS. [WINSRV] - Use a DLL instanc...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Nov 2 13:50:31 2012 New Revision: 57665 URL:
http://svn.reactos.org/svn/reactos?rev=57665&view=rev
Log: [WIN32K] - Remove the now unneeded CSR messaging support. - CsrInit() goes away also and the usage of the CsrProcess is replaced by that of gpepCSRSS. [WINSRV] - Use a DLL instance for loading resources, instead of calling GetModuleHandle. [KERNEL32/NTDLL] - Remove unneeded variables. Removed: branches/ros-csrss/win32ss/user/ntuser/csr.c branches/ros-csrss/win32ss/user/ntuser/csr.h Modified: branches/ros-csrss/dll/ntdll/include/ntdllp.h branches/ros-csrss/dll/win32/kernel32/include/kernel32.h branches/ros-csrss/win32ss/CMakeLists.txt branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c branches/ros-csrss/win32ss/user/ntuser/desktop.c branches/ros-csrss/win32ss/user/ntuser/hook.c branches/ros-csrss/win32ss/user/ntuser/menu.c branches/ros-csrss/win32ss/user/ntuser/ntuser.c branches/ros-csrss/win32ss/user/ntuser/ntuser.h branches/ros-csrss/win32ss/user/ntuser/simplecall.c branches/ros-csrss/win32ss/user/winsrv/init.c branches/ros-csrss/win32ss/user/winsrv/shutdown.c branches/ros-csrss/win32ss/user/winsrv/winsrv.h branches/ros-csrss/win32ss/win32kp.h Modified: branches/ros-csrss/dll/ntdll/include/ntdllp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/ntdll/include/ntd…
============================================================================== --- branches/ros-csrss/dll/ntdll/include/ntdllp.h [iso-8859-1] (original) +++ branches/ros-csrss/dll/ntdll/include/ntdllp.h [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -162,7 +162,5 @@ VOID NTAPI LdrpFinalizeAndDeallocateDataTableEntry(IN PLDR_DATA_TABLE_ENTRY Entry); - -extern HANDLE WindowsApiPort; /* EOF */ Modified: branches/ros-csrss/dll/win32/kernel32/include/kernel32.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/dll/win32/kernel32/in…
============================================================================== --- branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original) +++ branches/ros-csrss/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -155,7 +155,6 @@ #define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_SUCCESS 2 #define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_CONTINUE 3 - extern PBASE_STATIC_SERVER_DATA BaseStaticServerData; typedef @@ -164,8 +163,6 @@ HANDLE hProcess, DWORD dwMilliseconds); - -extern BOOLEAN InWindows; extern WaitForInputIdleType UserWaitForInputIdleRoutine; /* GLOBAL VARIABLES **********************************************************/ Modified: branches/ros-csrss/win32ss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/CMakeLists.tx…
============================================================================== --- branches/ros-csrss/win32ss/CMakeLists.txt [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/CMakeLists.txt [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -103,7 +103,6 @@ user/ntuser/caret.c user/ntuser/class.c user/ntuser/clipboard.c - user/ntuser/csr.c user/ntuser/defwnd.c user/ntuser/desktop.c user/ntuser/display.c Modified: branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/gdi/ntgdi/gdi…
============================================================================== --- branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/gdi/ntgdi/gdikdbgext.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -14,7 +14,6 @@ extern PENTRY gpentHmgr; extern PULONG gpaulRefCount; -extern PEPROCESS gpepCSRSS; extern ULONG gulFirstUnused; Removed: branches/ros-csrss/win32ss/user/ntuser/csr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/csr.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/csr.c (removed) @@ -1,52 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Interface to csrss - * FILE: subsys/win32k/ntuser/csr.c - * PROGRAMER: Ge van Geldorp (ge(a)gse.nl) - */ - -#include <win32k.h> -DBG_DEFAULT_CHANNEL(UserMisc); - -static HANDLE WindowsApiPort = NULL; -PEPROCESS CsrProcess = NULL; - -NTSTATUS FASTCALL -CsrInit(void) -{ - NTSTATUS Status; - UNICODE_STRING PortName; - ULONG ConnectInfoLength; - SECURITY_QUALITY_OF_SERVICE Qos; - - ERR("CsrInit\n"); - - RtlInitUnicodeString(&PortName, L"\\Windows\\ApiPort"); - ConnectInfoLength = 0; - Qos.Length = sizeof(Qos); - Qos.ImpersonationLevel = SecurityDelegation; - Qos.ContextTrackingMode = SECURITY_STATIC_TRACKING; - Qos.EffectiveOnly = FALSE; - - CsrProcess = PsGetCurrentProcess(); - ERR("CsrInit - CsrProcess = 0x%p\n", CsrProcess); - - Status = ZwConnectPort(&WindowsApiPort, - &PortName, - &Qos, - NULL, - NULL, - NULL, - NULL, - &ConnectInfoLength); - if (!NT_SUCCESS(Status)) - { - ERR("CsrInit - Status = 0x%p\n", Status); - return Status; - } - - return STATUS_SUCCESS; -} - -/* EOF */ Removed: branches/ros-csrss/win32ss/user/ntuser/csr.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/csr.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/csr.h (removed) @@ -1,16 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Interface to csrss - * FILE: subsys/win32k/include/csr.h - * PROGRAMER: Ge van Geldorp (ge(a)gse.nl) - */ - -#pragma once - -extern PEPROCESS CsrProcess; - -NTSTATUS FASTCALL CsrInit(void); - -/* EOF */ Modified: branches/ros-csrss/win32ss/user/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/d…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/desktop.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -2024,7 +2024,7 @@ // FIXME: IntSetThreadDesktop validates the desktop handle, it should happen // here too and set the NT error level. Q. Is it necessary to have the validation // in IntSetThreadDesktop? Is it needed there too? - if (hDesktop || (!hDesktop && CsrProcess == PsGetCurrentProcess())) + if (hDesktop || (!hDesktop && PsGetCurrentProcess() == gpepCSRSS)) ret = IntSetThreadDesktop(hDesktop, FALSE); UserLeave(); Modified: branches/ros-csrss/win32ss/user/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/h…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/hook.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/hook.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -94,7 +94,7 @@ ERR("IntHookModuleUnloaded: iHookID=%d\n", iHookID); - ppiCsr = PsGetProcessWin32Process(CsrProcess); + ppiCsr = PsGetProcessWin32Process(gpepCSRSS); ListEntry = pdesk->PtiList.Flink; while(ListEntry != &pdesk->PtiList) @@ -147,7 +147,7 @@ PPROCESSINFO ppiCsr; pti = PsGetCurrentThreadWin32Thread(); - ppiCsr = PsGetProcessWin32Process(CsrProcess); + ppiCsr = PsGetProcessWin32Process(gpepCSRSS); /* Fail if the api hook is already registered */ if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK) Modified: branches/ros-csrss/win32ss/user/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/m…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/menu.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/menu.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -1522,14 +1522,13 @@ NTSTATUS Status; PEPROCESS CurrentProcess = PsGetCurrentProcess(); - if (CsrProcess != CurrentProcess) + if (gpepCSRSS != CurrentProcess) { /* - * CsrProcess does not have a Win32WindowStation - * - */ - - Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation, + * gpepCSRSS does not have a Win32WindowStation + */ + + Status = IntValidateWindowStationHandle(CurrentProcess->Win32WindowStation, KernelMode, 0, &WinStaObject); Modified: branches/ros-csrss/win32ss/user/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/n…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/ntuser.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/ntuser.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -20,7 +20,7 @@ BOOL gbInitialized; HINSTANCE hModClient = NULL; BOOL ClientPfnInit = FALSE; -PEPROCESS gpepCSRSS; +PEPROCESS gpepCSRSS = NULL; /* PRIVATE FUNCTIONS *********************************************************/ @@ -133,8 +133,6 @@ NtUserUpdatePerUserSystemParameters(0, TRUE); - CsrInit(); - if (gpsi->hbrGray == NULL) { hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA); Modified: branches/ros-csrss/win32ss/user/ntuser/ntuser.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/n…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/ntuser.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/ntuser.h [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -15,6 +15,7 @@ extern PPROCESSINFO gppiList; extern PPROCESSINFO ppiScrnSaver; extern PPROCESSINFO gppiInputProvider; +extern PEPROCESS gpepCSRSS; INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID); VOID FASTCALL CleanupUserImpl(VOID); Modified: branches/ros-csrss/win32ss/user/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/s…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -334,7 +334,7 @@ BOOL Ret = TRUE; PPROCESSINFO ppi; PDWORD pdwLayout; - if ( PsGetCurrentProcess() == CsrProcess) + if ( PsGetCurrentProcess() == gpepCSRSS) { EngSetLastError(ERROR_INVALID_ACCESS); RETURN(FALSE); Modified: branches/ros-csrss/win32ss/user/winsrv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/i…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -16,7 +16,7 @@ #define NDEBUG #include <debug.h> -HANDLE DllHandle = NULL; +HINSTANCE UserSrvDllInstance = NULL; // HANDLE WinSrvApiPort = NULL; /* Memory */ @@ -357,7 +357,7 @@ BOOL WINAPI -DllMain(IN HANDLE hDll, +DllMain(IN HINSTANCE hInstanceDll, IN DWORD dwReason, IN LPVOID lpReserved) { @@ -366,7 +366,7 @@ if (DLL_PROCESS_ATTACH == dwReason) { - DllHandle = hDll; + UserSrvDllInstance = hInstanceDll; /*** HACK from win32csr... ***/ Modified: branches/ros-csrss/win32ss/user/winsrv/shutdown.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/s…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -244,7 +244,7 @@ SetThreadDesktop(NotifyContext->Desktop); SwitchDesktop(NotifyContext->Desktop); CallInitCommonControls(); - NotifyContext->Dlg = CreateDialogParam(GetModuleHandleW(L"win32csr"), + NotifyContext->Dlg = CreateDialogParam(UserSrvDllInstance, MAKEINTRESOURCE(IDD_END_NOW), NULL, EndNowDlgProc, (LPARAM) NotifyContext); if (NULL == NotifyContext->Dlg) Modified: branches/ros-csrss/win32ss/user/winsrv/winsrv.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/w…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/winsrv.h [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -36,6 +36,7 @@ #include "resource.h" +extern HINSTANCE UserSrvDllInstance; extern HANDLE UserSrvHeap; // extern HANDLE BaseSrvSharedHeap; // extern PBASE_STATIC_SERVER_DATA BaseStaticServerData; Modified: branches/ros-csrss/win32ss/win32kp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/win32kp.h?rev…
============================================================================== --- branches/ros-csrss/win32ss/win32kp.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/win32kp.h [iso-8859-1] Fri Nov 2 13:50:31 2012 @@ -100,7 +100,6 @@ #include "user/ntuser/vis.h" #include "user/ntuser/userfuncs.h" #include "user/ntuser/scroll.h" -#include "user/ntuser/csr.h" #include "user/ntuser/winpos.h" #include "user/ntuser/callback.h"
12 years, 1 month
1
0
0
0
[hbelusca] 57664: [WIN32K/USER32/WINSRV] - Correct an enumeration identificator initialization. - Move the call of CSR for registering the logon application, from kernel-mode win32k to user-mode us...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Nov 2 11:23:26 2012 New Revision: 57664 URL:
http://svn.reactos.org/svn/reactos?rev=57664&view=rev
Log: [WIN32K/USER32/WINSRV] - Correct an enumeration identificator initialization. - Move the call of CSR for registering the logon application, from kernel-mode win32k to user-mode user32 and therefore remove the unneeded co_CsrNotify function (plus some other unneeded defines). - Comment some non-working code (#if 0) in user32/misc/misc.c and winsrv/shutdown.c. Modified: branches/ros-csrss/include/reactos/subsys/win/winmsg.h branches/ros-csrss/win32ss/user/ntuser/csr.c branches/ros-csrss/win32ss/user/ntuser/csr.h branches/ros-csrss/win32ss/user/ntuser/simplecall.c branches/ros-csrss/win32ss/user/user32/include/user32p.h branches/ros-csrss/win32ss/user/user32/misc/dllmain.c branches/ros-csrss/win32ss/user/user32/misc/exit.c branches/ros-csrss/win32ss/user/user32/misc/misc.c branches/ros-csrss/win32ss/user/winsrv/init.c branches/ros-csrss/win32ss/user/winsrv/server.c branches/ros-csrss/win32ss/user/winsrv/shutdown.c Modified: branches/ros-csrss/include/reactos/subsys/win/winmsg.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/win/winmsg.h [iso-8859-1] (original) +++ branches/ros-csrss/include/reactos/subsys/win/winmsg.h [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -19,7 +19,7 @@ typedef enum _USERSRV_API_NUMBER { - UserpExitWindowsEx = USERSRV_SERVERDLL_INDEX, + UserpExitWindowsEx = USERSRV_FIRST_API_NUMBER, // UserpEndTask, // UserpLogon, UserpRegisterServicesProcess, // Not present in Win7 @@ -45,12 +45,12 @@ typedef struct { - HANDLE ProcessId; + ULONG_PTR ProcessId; } CSRSS_REGISTER_SERVICES_PROCESS, *PCSRSS_REGISTER_SERVICES_PROCESS; typedef struct { - HANDLE ProcessId; + ULONG_PTR ProcessId; BOOL Register; } CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS; Modified: branches/ros-csrss/win32ss/user/ntuser/csr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/csr.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/csr.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -7,6 +7,7 @@ */ #include <win32k.h> +DBG_DEFAULT_CHANNEL(UserMisc); static HANDLE WindowsApiPort = NULL; PEPROCESS CsrProcess = NULL; @@ -19,12 +20,17 @@ ULONG ConnectInfoLength; SECURITY_QUALITY_OF_SERVICE Qos; + ERR("CsrInit\n"); + RtlInitUnicodeString(&PortName, L"\\Windows\\ApiPort"); ConnectInfoLength = 0; Qos.Length = sizeof(Qos); Qos.ImpersonationLevel = SecurityDelegation; Qos.ContextTrackingMode = SECURITY_STATIC_TRACKING; Qos.EffectiveOnly = FALSE; + + CsrProcess = PsGetCurrentProcess(); + ERR("CsrInit - CsrProcess = 0x%p\n", CsrProcess); Status = ZwConnectPort(&WindowsApiPort, &PortName, @@ -36,61 +42,11 @@ &ConnectInfoLength); if (!NT_SUCCESS(Status)) { + ERR("CsrInit - Status = 0x%p\n", Status); return Status; } - - CsrProcess = PsGetCurrentProcess(); return STATUS_SUCCESS; } - -NTSTATUS FASTCALL -co_CsrNotify(IN OUT PCSR_API_MESSAGE ApiMessage, - IN ULONG DataLength) -{ - NTSTATUS Status; - PEPROCESS OldProcess; - - if (NULL == CsrProcess) - { - return STATUS_INVALID_PORT_HANDLE; - } - - /* Fill out the Port Message Header */ - ApiMessage->Header.u2.ZeroInit = 0; - ApiMessage->Header.u1.s1.TotalLength = - FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength; - /* FIELD_OFFSET(CSR_API_MESSAGE, Data) <= sizeof(CSR_API_MESSAGE) - sizeof(ApiMessage->Data) */ - ApiMessage->Header.u1.s1.DataLength = - ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE); - - /* Switch to the process in which the WindowsApiPort handle is valid */ - OldProcess = PsGetCurrentProcess(); - if (CsrProcess != OldProcess) - { - KeAttachProcess(&CsrProcess->Pcb); - } - - UserLeaveCo(); - - Status = ZwRequestWaitReplyPort(WindowsApiPort, - &ApiMessage->Header, - &ApiMessage->Header); - - UserEnterCo(); - - if (CsrProcess != OldProcess) - { - KeDetachProcess(); - } - - if (NT_SUCCESS(Status)) - { - Status = ApiMessage->Status; - } - - return Status; -} - /* EOF */ Modified: branches/ros-csrss/win32ss/user/ntuser/csr.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/c…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/csr.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/csr.h [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -12,11 +12,5 @@ extern PEPROCESS CsrProcess; NTSTATUS FASTCALL CsrInit(void); -NTSTATUS FASTCALL co_CsrNotify(IN OUT PCSR_API_MESSAGE ApiMessage, - IN ULONG DataLength); -NTSTATUS FASTCALL CsrCloseHandle(HANDLE Handle); -NTSTATUS WINAPI CsrInsertObject(HANDLE ObjectHandle, - ACCESS_MASK DesiredAccess, - PHANDLE Handle); /* EOF */ Modified: branches/ros-csrss/win32ss/user/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/ntuser/s…
============================================================================== --- branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/ntuser/simplecall.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -15,9 +15,8 @@ BOOL FASTCALL co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register) { + NTSTATUS Status; PEPROCESS Process; - NTSTATUS Status; - USER_API_MESSAGE Request; Status = PsLookupProcessByProcessId(ProcessId, &Process); @@ -51,18 +50,6 @@ } ObDereferenceObject(Process); - - Request.ApiNumber = CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess); - Request.Data.RegisterLogonProcessRequest.ProcessId = ProcessId; - Request.Data.RegisterLogonProcessRequest.Register = Register; - - Status = co_CsrNotify((PCSR_API_MESSAGE)&Request, - sizeof(CSRSS_REGISTER_LOGON_PROCESS)); - if (!NT_SUCCESS(Status)) - { - ERR("Failed to register logon process with CSRSS\n"); - return FALSE; - } return TRUE; } Modified: branches/ros-csrss/win32ss/user/user32/include/user32p.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/i…
============================================================================== --- branches/ros-csrss/win32ss/user/user32/include/user32p.h [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/user32/include/user32p.h [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -23,6 +23,7 @@ extern PPROCESSINFO g_ppi; extern ULONG_PTR g_ulSharedDelta; extern PSERVERINFO gpsi; +extern BOOLEAN gfLogonProcess; extern BOOLEAN gfServerProcess; extern PUSER_HANDLE_TABLE gHandleTable; extern PUSER_HANDLE_ENTRY gHandleEntries; Modified: branches/ros-csrss/win32ss/user/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
============================================================================== --- branches/ros-csrss/win32ss/user/user32/misc/dllmain.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/user32/misc/dllmain.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -13,6 +13,7 @@ PUSER_HANDLE_ENTRY gHandleEntries = NULL; PSERVERINFO gpsi = NULL; ULONG_PTR g_ulSharedDelta; +BOOLEAN gfLogonProcess = FALSE; BOOLEAN gfServerProcess = FALSE; WCHAR szAppInit[KEY_LENGTH]; Modified: branches/ros-csrss/win32ss/user/user32/misc/exit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
============================================================================== --- branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/user32/misc/exit.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -67,8 +67,8 @@ ExitWindowsEx(UINT uFlags, DWORD dwReserved) { + NTSTATUS Status; USER_API_MESSAGE ApiMessage; - NTSTATUS Status; ApiMessage.Data.ExitReactosRequest.Flags = uFlags; ApiMessage.Data.ExitReactosRequest.Reserved = dwReserved; @@ -93,10 +93,10 @@ BOOL WINAPI RegisterServicesProcess(DWORD ServicesProcessId) { + NTSTATUS Status; USER_API_MESSAGE ApiMessage; - NTSTATUS Status; - ApiMessage.Data.RegisterServicesProcessRequest.ProcessId = UlongToHandle(ServicesProcessId); + ApiMessage.Data.RegisterServicesProcessRequest.ProcessId = ServicesProcessId; Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, NULL, Modified: branches/ros-csrss/win32ss/user/user32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/user32/m…
============================================================================== --- branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/user32/misc/misc.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -42,7 +42,29 @@ WINAPI RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister) { - return NtUserxRegisterLogonProcess(dwProcessId, bRegister); + gfLogonProcess = NtUserxRegisterLogonProcess(dwProcessId, bRegister); + + if (gfLogonProcess) + { + NTSTATUS Status; + USER_API_MESSAGE ApiMessage; + + ApiMessage.Data.RegisterLogonProcessRequest.ProcessId = dwProcessId; + ApiMessage.Data.RegisterLogonProcessRequest.Register = bRegister; + + Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, + NULL, + CSR_CREATE_API_NUMBER(USERSRV_SERVERDLL_INDEX, UserpRegisterLogonProcess), + sizeof(CSRSS_REGISTER_LOGON_PROCESS)); + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = ApiMessage.Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + ERR("Failed to register logon process with CSRSS\n"); + // return FALSE; + } + } + + return gfLogonProcess; } /* @@ -52,6 +74,7 @@ WINAPI SetLogonNotifyWindow(HWND Wnd, HWINSTA WinSta) { +#if 0 /* Maybe we should call NtUserSetLogonNotifyWindow and let that one inform CSRSS??? */ CSR_API_MESSAGE Request; NTSTATUS Status; @@ -69,6 +92,8 @@ } return NtUserSetLogonNotifyWindow(Wnd); +#endif + return TRUE; } /* Modified: branches/ros-csrss/win32ss/user/winsrv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/i…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/init.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -79,105 +79,6 @@ // NULL }; - -/* -PCSR_API_ROUTINE Win32CsrApiDefinitions[] = -{ - CsrGetHandle, - CsrGetHandle, - CsrCloseHandle, - CsrVerifyHandle, - CsrDuplicateHandle, - CsrGetInputWaitHandle, - CsrFillOutputChar, - CsrReadInputEvent, - CsrWriteConsoleOutputChar, - CsrWriteConsoleOutputAttrib, - CsrFillOutputAttrib, - CsrSetTextAttrib, - CsrWriteConsoleOutput, - CsrFlushInputBuffer, - CsrReadConsoleOutputChar, - CsrReadConsoleOutputAttrib, - CsrExitReactos, - CsrHardwareStateProperty, - CsrCreateDesktop, - CsrShowDesktop, - CsrHideDesktop, - CsrSetLogonNotifyWindow, - CsrRegisterLogonProcess, - CsrGenerateCtrlEvent, -}; - -static CSRSS_API_DEFINITION Win32CsrApiDefinitions[] = -{ - CSRSS_DEFINE_API(GET_INPUT_HANDLE, CsrGetHandle), - CSRSS_DEFINE_API(GET_OUTPUT_HANDLE, CsrGetHandle), - CSRSS_DEFINE_API(CLOSE_HANDLE, CsrCloseHandle), - CSRSS_DEFINE_API(VERIFY_HANDLE, CsrVerifyHandle), - CSRSS_DEFINE_API(DUPLICATE_HANDLE, CsrDuplicateHandle), - CSRSS_DEFINE_API(GET_INPUT_WAIT_HANDLE, CsrGetInputWaitHandle), - CSRSS_DEFINE_API(WRITE_CONSOLE, CsrWriteConsole), - CSRSS_DEFINE_API(READ_CONSOLE, CsrReadConsole), - CSRSS_DEFINE_API(ALLOC_CONSOLE, CsrAllocConsole), - CSRSS_DEFINE_API(FREE_CONSOLE, CsrFreeConsole), - CSRSS_DEFINE_API(SCREEN_BUFFER_INFO, CsrGetScreenBufferInfo), - CSRSS_DEFINE_API(SET_CURSOR, CsrSetCursor), - CSRSS_DEFINE_API(FILL_OUTPUT, CsrFillOutputChar), - CSRSS_DEFINE_API(READ_INPUT, CsrReadInputEvent), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT_CHAR, CsrWriteConsoleOutputChar), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT_ATTRIB, CsrWriteConsoleOutputAttrib), - CSRSS_DEFINE_API(FILL_OUTPUT_ATTRIB, CsrFillOutputAttrib), - CSRSS_DEFINE_API(GET_CURSOR_INFO, CsrGetCursorInfo), - CSRSS_DEFINE_API(SET_CURSOR_INFO, CsrSetCursorInfo), - CSRSS_DEFINE_API(SET_ATTRIB, CsrSetTextAttrib), - CSRSS_DEFINE_API(GET_CONSOLE_MODE, CsrGetConsoleMode), - CSRSS_DEFINE_API(SET_CONSOLE_MODE, CsrSetConsoleMode), - CSRSS_DEFINE_API(CREATE_SCREEN_BUFFER, CsrCreateScreenBuffer), - CSRSS_DEFINE_API(SET_SCREEN_BUFFER, CsrSetScreenBuffer), - CSRSS_DEFINE_API(SET_TITLE, CsrSetTitle), - CSRSS_DEFINE_API(GET_TITLE, CsrGetTitle), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT, CsrWriteConsoleOutput), - CSRSS_DEFINE_API(FLUSH_INPUT_BUFFER, CsrFlushInputBuffer), - CSRSS_DEFINE_API(SCROLL_CONSOLE_SCREEN_BUFFER, CsrScrollConsoleScreenBuffer), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT_CHAR, CsrReadConsoleOutputChar), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT_ATTRIB, CsrReadConsoleOutputAttrib), - CSRSS_DEFINE_API(GET_NUM_INPUT_EVENTS, CsrGetNumberOfConsoleInputEvents), - CSRSS_DEFINE_API(EXIT_REACTOS, CsrExitReactos), - CSRSS_DEFINE_API(PEEK_CONSOLE_INPUT, CsrPeekConsoleInput), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT, CsrReadConsoleOutput), - CSRSS_DEFINE_API(WRITE_CONSOLE_INPUT, CsrWriteConsoleInput), - CSRSS_DEFINE_API(SETGET_CONSOLE_HW_STATE, CsrHardwareStateProperty), - CSRSS_DEFINE_API(GET_CONSOLE_WINDOW, CsrGetConsoleWindow), - CSRSS_DEFINE_API(CREATE_DESKTOP, CsrCreateDesktop), - CSRSS_DEFINE_API(SHOW_DESKTOP, CsrShowDesktop), - CSRSS_DEFINE_API(HIDE_DESKTOP, CsrHideDesktop), - CSRSS_DEFINE_API(SET_CONSOLE_ICON, CsrSetConsoleIcon), - CSRSS_DEFINE_API(SET_LOGON_NOTIFY_WINDOW, CsrSetLogonNotifyWindow), - CSRSS_DEFINE_API(REGISTER_LOGON_PROCESS, CsrRegisterLogonProcess), - CSRSS_DEFINE_API(GET_CONSOLE_CP, CsrGetConsoleCodePage), - CSRSS_DEFINE_API(SET_CONSOLE_CP, CsrSetConsoleCodePage), - CSRSS_DEFINE_API(GET_CONSOLE_OUTPUT_CP, CsrGetConsoleOutputCodePage), - CSRSS_DEFINE_API(SET_CONSOLE_OUTPUT_CP, CsrSetConsoleOutputCodePage), - CSRSS_DEFINE_API(GET_PROCESS_LIST, CsrGetProcessList), - CSRSS_DEFINE_API(ADD_CONSOLE_ALIAS, CsrAddConsoleAlias), - CSRSS_DEFINE_API(GET_CONSOLE_ALIAS, CsrGetConsoleAlias), - CSRSS_DEFINE_API(GET_ALL_CONSOLE_ALIASES, CsrGetAllConsoleAliases), - CSRSS_DEFINE_API(GET_ALL_CONSOLE_ALIASES_LENGTH, CsrGetAllConsoleAliasesLength), - CSRSS_DEFINE_API(GET_CONSOLE_ALIASES_EXES, CsrGetConsoleAliasesExes), - CSRSS_DEFINE_API(GET_CONSOLE_ALIASES_EXES_LENGTH, CsrGetConsoleAliasesExesLength), - CSRSS_DEFINE_API(GENERATE_CTRL_EVENT, CsrGenerateCtrlEvent), - CSRSS_DEFINE_API(SET_SCREEN_BUFFER_SIZE, CsrSetScreenBufferSize), - CSRSS_DEFINE_API(GET_CONSOLE_SELECTION_INFO, CsrGetConsoleSelectionInfo), - CSRSS_DEFINE_API(GET_COMMAND_HISTORY_LENGTH, CsrGetCommandHistoryLength), - CSRSS_DEFINE_API(GET_COMMAND_HISTORY, CsrGetCommandHistory), - CSRSS_DEFINE_API(EXPUNGE_COMMAND_HISTORY, CsrExpungeCommandHistory), - CSRSS_DEFINE_API(SET_HISTORY_NUMBER_COMMANDS, CsrSetHistoryNumberCommands), - CSRSS_DEFINE_API(GET_HISTORY_INFO, CsrGetHistoryInfo), - CSRSS_DEFINE_API(SET_HISTORY_INFO, CsrSetHistoryInfo), - { 0, 0, NULL } -}; -*/ /* FUNCTIONS ******************************************************************/ @@ -356,9 +257,9 @@ NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK); } +/*** HACK from win32csr... ***/ static HHOOK hhk = NULL; -/*** HACK from win32csr... ***/ LRESULT CALLBACK KeyboardHookProc(int nCode, @@ -428,7 +329,7 @@ // LoadedServerDll->NewProcessCallback = Win32CsrDuplicateHandleTable; LoadedServerDll->HardErrorCallback = Win32CsrHardError; -/*** From win32csr... ***/ +/*** From win32csr... See r54125 ***/ /* Start the Raw Input Thread and the Desktop Thread */ for (i = 0; i < 2; ++i) { Modified: branches/ros-csrss/win32ss/user/winsrv/server.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/s…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/server.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/server.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -18,7 +18,7 @@ /* GLOBALS *******************************************************************/ static BOOLEAN ServicesProcessIdValid = FALSE; -static ULONG_PTR ServicesProcessId; +static ULONG_PTR ServicesProcessId = 0; /* FUNCTIONS *****************************************************************/ @@ -34,7 +34,7 @@ } else { - ServicesProcessId = (ULONG_PTR)RegisterServicesProcessRequest->ProcessId; + ServicesProcessId = RegisterServicesProcessRequest->ProcessId; ServicesProcessIdValid = TRUE; return STATUS_SUCCESS; } Modified: branches/ros-csrss/win32ss/user/winsrv/shutdown.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/win32ss/user/winsrv/s…
============================================================================== --- branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] (original) +++ branches/ros-csrss/win32ss/user/winsrv/shutdown.c [iso-8859-1] Fri Nov 2 11:23:26 2012 @@ -16,7 +16,7 @@ static HWND LogonNotifyWindow = NULL; -static HANDLE LogonProcess = NULL; +static ULONG_PTR LogonProcessId = 0; /* FUNCTIONS *****************************************************************/ @@ -36,21 +36,21 @@ if (RegisterLogonProcessRequest->Register) { - if (0 != LogonProcess) - { + if (LogonProcessId != 0) return STATUS_LOGON_SESSION_EXISTS; - } - LogonProcess = RegisterLogonProcessRequest->ProcessId; + + LogonProcessId = RegisterLogonProcessRequest->ProcessId; } else { - if (ApiMessage->Header.ClientId.UniqueProcess != LogonProcess) + if (ApiMessage->Header.ClientId.UniqueProcess != (HANDLE)LogonProcessId) { DPRINT1("Current logon process 0x%x, can't deregister from process 0x%x\n", - LogonProcess, ApiMessage->Header.ClientId.UniqueProcess); + LogonProcessId, ApiMessage->Header.ClientId.UniqueProcess); return STATUS_NOT_LOGON_PROCESS; } - LogonProcess = 0; + + LogonProcessId = 0; } return STATUS_SUCCESS; @@ -67,7 +67,7 @@ DPRINT1("Can't get window creator\n"); return STATUS_INVALID_HANDLE; } - if (WindowCreator != (DWORD_PTR)LogonProcess) + if (WindowCreator != LogonProcessId) { DPRINT1("Trying to register window not created by winlogon as notify window\n"); return STATUS_ACCESS_DENIED; @@ -487,6 +487,7 @@ } /* TODO: Find another way to do it. */ +#if 0 VOID FASTCALL ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, DWORD Timeout) { @@ -509,6 +510,7 @@ CloseHandle(Thread); } } +#endif /************************************************/ static BOOL FASTCALL @@ -524,12 +526,15 @@ if (0 == (Flags & EWX_FORCE)) { + // TODO: Find in an other way whether or not the process has a console. +#if 0 if (NULL != ProcessData->Console) { ConioConsoleCtrlEventTimeout(CTRL_LOGOFF_EVENT, ProcessData, ShutdownSettings->WaitToKillAppTimeout); } else +#endif { Context.ProcessId = (DWORD_PTR) ProcessData->ClientId.UniqueProcess; Context.wParam = 0; @@ -612,7 +617,7 @@ /* Do not kill winlogon or csrss */ if ((DWORD_PTR) ProcessData->ClientId.UniqueProcess == Context->CsrssProcess || - ProcessData->ClientId.UniqueProcess == LogonProcess) + ProcessData->ClientId.UniqueProcess == LogonProcessId) { return STATUS_SUCCESS; } @@ -819,7 +824,7 @@ TOKEN_USER *UserInfo; SHUTDOWN_SETTINGS ShutdownSettings; - if (ProcessId != (DWORD_PTR) LogonProcess) + if (ProcessId != (DWORD_PTR) LogonProcessId) { DPRINT1("Internal ExitWindowsEx call not from winlogon\n"); return STATUS_ACCESS_DENIED;
12 years, 1 month
1
0
0
0
[gadamopoulos] 57663: - Fix the double scrollbars in explorer
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Thu Nov 1 17:28:52 2012 New Revision: 57663 URL:
http://svn.reactos.org/svn/reactos?rev=57663&view=rev
Log: - Fix the double scrollbars in explorer Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Thu Nov 1 17:28:52 2012 @@ -1604,8 +1604,8 @@ #ifndef __REACTOS__ case WM_SETVISIBLE: #endif - if (ci->hwndChildMaximized) ci->mdiFlags &= ~MDIF_NEEDUPDATE; - else MDI_PostUpdate(client, ci, SB_BOTH+1); + /*if (ci->hwndChildMaximized) ci->mdiFlags &= ~MDIF_NEEDUPDATE; + else*/ MDI_PostUpdate(client, ci, SB_BOTH+1); break; case WM_SIZE: @@ -1843,7 +1843,6 @@ } HeapFree( GetProcessHeap(), 0, list ); } - MapWindowPoints( 0, hwnd, (POINT *)&childRect, 2 ); UnionRect( &childRect, &clientRect, &childRect ); /* set common info values */
12 years, 1 month
1
0
0
0
[hbelusca] 57662: [KERNEL32/NTDLL] - Move the ReactOS-specific workaround described in http://jira.reactos.org/browse/CORE-6611 and http://jira.reactos.org/browse/CORE-4620 from kernel32 to ntdll f...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Nov 1 12:52:34 2012 New Revision: 57662 URL:
http://svn.reactos.org/svn/reactos?rev=57662&view=rev
Log: [KERNEL32/NTDLL] - Move the ReactOS-specific workaround described in
http://jira.reactos.org/browse/CORE-6611
and
http://jira.reactos.org/browse/CORE-4620
from kernel32 to ntdll for using it by RtlGetVersion, in order to : * still having it available in user-mode only, * and having VerifyVersionInfo (and its Rtl counter-part) working properly. [RTL/NTOSKRNL] - Code formatting. - Use a defined-constant instead of a hard-coded value. Modified: trunk/reactos/dll/ntdll/rtl/version.c trunk/reactos/dll/win32/kernel32/client/version.c trunk/reactos/lib/rtl/version.c trunk/reactos/ntoskrnl/mm/ARM3/procsup.c trunk/reactos/ntoskrnl/rtl/misc.c Modified: trunk/reactos/dll/ntdll/rtl/version.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/rtl/version.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/rtl/version.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/rtl/version.c [iso-8859-1] Thu Nov 1 12:52:34 2012 @@ -8,13 +8,64 @@ * Created 01/11/98 */ -/* INCLUDES ****************************************************************/ +/* INCLUDES *******************************************************************/ #include <ntdll.h> #define NDEBUG #include <debug.h> -/* FUNCTIONS ****************************************************************/ +/* FUNCTIONS ******************************************************************/ + +/* HACK: ReactOS specific changes, see bug-reports CORE-6611 and CORE-4620 (aka. #5003) */ +static VOID NTAPI +SetRosSpecificInfo(IN OUT PRTL_OSVERSIONINFOEXW VersionInformation) +{ + CHAR Buffer[sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(ULONG)]; + PKEY_VALUE_PARTIAL_INFORMATION kvpInfo = (PVOID)Buffer; + OBJECT_ATTRIBUTES ObjectAttributes; + ULONG ReportAsWorkstation = 0; + HANDLE hKey; + ULONG Length; + NTSTATUS Status; + UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version"); + UNICODE_STRING ValName = RTL_CONSTANT_STRING(L"ReportAsWorkstation"); + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_OPENIF | OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + /* Don't change anything if the key doesn't exist */ + Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes); + if (NT_SUCCESS(Status)) + { + /* Get the value from the registry and make sure it's a 32-bit value */ + Status = NtQueryValueKey(hKey, + &ValName, + KeyValuePartialInformation, + kvpInfo, + sizeof(Buffer), + &Length); + if (NT_SUCCESS(Status) && + (kvpInfo->Type == REG_DWORD) && + (kvpInfo->DataLength == sizeof(ULONG))) + { + /* Is the value set? */ + ReportAsWorkstation = *(PULONG)kvpInfo->Data; + if ((VersionInformation->wProductType == VER_NT_SERVER) && + (ReportAsWorkstation != 0)) + { + /* It is, modify the product type to report a workstation */ + VersionInformation->wProductType = VER_NT_WORKSTATION; + DPRINT1("We modified the reported OS from NtProductServer to NtProductWinNt\n"); + } + } + + /* Close the handle */ + NtClose(hKey); + } +} /********************************************************************** * NAME EXPORTED @@ -40,12 +91,11 @@ * * @implemented */ - BOOLEAN NTAPI RtlGetNtProductType(PNT_PRODUCT_TYPE ProductType) { - *ProductType = SharedUserData->NtProductType; - return(TRUE); + *ProductType = SharedUserData->NtProductType; + return TRUE; } /********************************************************************** @@ -71,7 +121,6 @@ * * @implemented */ - VOID NTAPI RtlGetNtVersionNumbers(OUT LPDWORD pdwMajorVersion, OUT LPDWORD pdwMinorVersion, @@ -101,49 +150,56 @@ } /* -* @implemented -*/ + * @implemented + * @note User-mode version of RtlGetVersion in ntoskrnl/rtl/misc.c + */ NTSTATUS NTAPI -RtlGetVersion(RTL_OSVERSIONINFOW *Info) -{ - LONG i, MaxLength; - - if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) || - Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) - { - PPEB Peb = NtCurrentPeb(); - - Info->dwMajorVersion = Peb->OSMajorVersion; - Info->dwMinorVersion = Peb->OSMinorVersion; - Info->dwBuildNumber = Peb->OSBuildNumber; - Info->dwPlatformId = Peb->OSPlatformId; - RtlZeroMemory(Info->szCSDVersion, sizeof(Info->szCSDVersion)); - if(((Peb->OSCSDVersion >> 8) & 0xFF) != 0) - { - MaxLength = (sizeof(Info->szCSDVersion) / sizeof(Info->szCSDVersion[0])) - 1; - i = _snwprintf(Info->szCSDVersion, - MaxLength, - L"Service Pack %d", - ((Peb->OSCSDVersion >> 8) & 0xFF)); - if (i < 0) +RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation) +{ + LONG i, MaxLength; + + if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) || + lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) + { + PPEB Peb = NtCurrentPeb(); + + lpVersionInformation->dwMajorVersion = Peb->OSMajorVersion; + lpVersionInformation->dwMinorVersion = Peb->OSMinorVersion; + lpVersionInformation->dwBuildNumber = Peb->OSBuildNumber; + lpVersionInformation->dwPlatformId = Peb->OSPlatformId; + RtlZeroMemory(lpVersionInformation->szCSDVersion, sizeof(lpVersionInformation->szCSDVersion)); + + if(((Peb->OSCSDVersion >> 8) & 0xFF) != 0) { - /* null-terminate if it was overflowed */ - Info->szCSDVersion[MaxLength] = L'\0'; + MaxLength = (sizeof(lpVersionInformation->szCSDVersion) / sizeof(lpVersionInformation->szCSDVersion[0])) - 1; + i = _snwprintf(lpVersionInformation->szCSDVersion, + MaxLength, + L"Service Pack %d", + ((Peb->OSCSDVersion >> 8) & 0xFF)); + if (i < 0) + { + /* Null-terminate if it was overflowed */ + lpVersionInformation->szCSDVersion[MaxLength] = L'\0'; + } } - } - if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) - { - RTL_OSVERSIONINFOEXW *InfoEx = (RTL_OSVERSIONINFOEXW *)Info; - InfoEx->wServicePackMajor = (Peb->OSCSDVersion >> 8) & 0xFF; - InfoEx->wServicePackMinor = Peb->OSCSDVersion & 0xFF; - InfoEx->wSuiteMask = SharedUserData->SuiteMask & 0xFFFF; - InfoEx->wProductType = SharedUserData->NtProductType; - } - - return STATUS_SUCCESS; - } - - return STATUS_INVALID_PARAMETER; + + if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) + { + PRTL_OSVERSIONINFOEXW InfoEx = (PRTL_OSVERSIONINFOEXW)lpVersionInformation; + InfoEx->wServicePackMajor = (Peb->OSCSDVersion >> 8) & 0xFF; + InfoEx->wServicePackMinor = Peb->OSCSDVersion & 0xFF; + InfoEx->wSuiteMask = SharedUserData->SuiteMask & 0xFFFF; + InfoEx->wProductType = SharedUserData->NtProductType; + InfoEx->wReserved = 0; + + /* HACK: ReactOS specific changes, see bug-reports CORE-6611 and CORE-4620 (aka. #5003) */ + SetRosSpecificInfo(InfoEx); + } + + return STATUS_SUCCESS; + } + + return STATUS_INVALID_PARAMETER; } /* EOF */ Modified: trunk/reactos/dll/win32/kernel32/client/version.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/version.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/version.c [iso-8859-1] Thu Nov 1 12:52:34 2012 @@ -13,57 +13,6 @@ #include <debug.h> /* FUNCTIONS ******************************************************************/ - -VOID -NTAPI -SetRosSpecificInfo(IN LPOSVERSIONINFOEXW VersionInformation) -{ - CHAR Buffer[sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(DWORD)]; - PKEY_VALUE_PARTIAL_INFORMATION kvpInfo = (PVOID)Buffer; - OBJECT_ATTRIBUTES ObjectAttributes; - DWORD ReportAsWorkstation = 0; - HANDLE hKey; - DWORD dwSize; - NTSTATUS Status; - UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version"); - UNICODE_STRING ValName = RTL_CONSTANT_STRING(L"ReportAsWorkstation"); - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - /* Don't change anything if the key doesn't exist */ - Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes); - if (NT_SUCCESS(Status)) - { - /* Get the value from the registry and make sure it's a 32-bit value */ - Status = NtQueryValueKey(hKey, - &ValName, - KeyValuePartialInformation, - kvpInfo, - sizeof(Buffer), - &dwSize); - if ((NT_SUCCESS(Status)) && - (kvpInfo->Type == REG_DWORD) && - (kvpInfo->DataLength == sizeof(DWORD))) - { - /* Is the value set? */ - ReportAsWorkstation = *(PULONG)kvpInfo->Data; - if ((VersionInformation->wProductType == VER_NT_SERVER) && - (ReportAsWorkstation)) - { - /* It is, modify the product type to report a workstation */ - VersionInformation->wProductType = VER_NT_WORKSTATION; - DPRINT1("We modified the reported OS from NtProductServer to NtProductWinNt\n"); - } - } - - /* Close the handle */ - NtClose(hKey); - } -} /* * @implemented @@ -104,9 +53,6 @@ { lpVersionInformationEx = (PVOID)lpVersionInformation; lpVersionInformationEx->wReserved = 0; - - /* ReactOS specific changes */ - SetRosSpecificInfo(lpVersionInformationEx); } return TRUE; Modified: trunk/reactos/lib/rtl/version.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/version.c?rev=5766…
============================================================================== --- trunk/reactos/lib/rtl/version.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/version.c [iso-8859-1] Thu Nov 1 12:52:34 2012 @@ -4,7 +4,7 @@ * PURPOSE: Runtime code * FILE: lib/rtl/version.c * PROGRAMERS: Filip Navara - * Hermes BELUSCA - MAITO + * Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) */ /* INCLUDES *****************************************************************/ @@ -18,9 +18,7 @@ NTSTATUS NTAPI -RtlGetVersion( - OUT PRTL_OSVERSIONINFOW lpVersionInformation - ); +RtlGetVersion(OUT PRTL_OSVERSIONINFOW lpVersionInformation); /* FUNCTIONS ****************************************************************/ @@ -54,11 +52,9 @@ */ NTSTATUS NTAPI -RtlVerifyVersionInfo( - IN PRTL_OSVERSIONINFOEXW VersionInfo, - IN ULONG TypeMask, - IN ULONGLONG ConditionMask - ) +RtlVerifyVersionInfo(IN PRTL_OSVERSIONINFOEXW VersionInfo, + IN ULONG TypeMask, + IN ULONGLONG ConditionMask) { RTL_OSVERSIONINFOEXW ver; NTSTATUS status; Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Thu Nov 1 12:52:34 2012 @@ -678,7 +678,7 @@ Peb->OSMajorVersion = NtMajorVersion; Peb->OSMinorVersion = NtMinorVersion; Peb->OSBuildNumber = (USHORT)(NtBuildNumber & 0x3FFF); - Peb->OSPlatformId = 2; /* VER_PLATFORM_WIN32_NT */ + Peb->OSPlatformId = VER_PLATFORM_WIN32_NT; Peb->OSCSDVersion = (USHORT)CmNtCSDVersion; // Modified: trunk/reactos/ntoskrnl/rtl/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/misc.c?rev=57…
============================================================================== --- trunk/reactos/ntoskrnl/rtl/misc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/rtl/misc.c [iso-8859-1] Thu Nov 1 12:52:34 2012 @@ -29,9 +29,8 @@ NTAPI RtlGetNtGlobalFlags(VOID) { - return(NtGlobalFlag); + return NtGlobalFlag; } - /* * @implemented @@ -39,41 +38,46 @@ NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation) { - LONG i; - ULONG MaxLength; - if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) || - lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) - { - lpVersionInformation->dwMajorVersion = NtMajorVersion; - lpVersionInformation->dwMinorVersion = NtMinorVersion; - lpVersionInformation->dwBuildNumber = NtBuildNumber; - lpVersionInformation->dwPlatformId = VER_PLATFORM_WIN32_NT; - RtlZeroMemory(lpVersionInformation->szCSDVersion, sizeof(lpVersionInformation->szCSDVersion)); - if(((CmNtCSDVersion >> 8) & 0xFF) != 0) - { - MaxLength = (sizeof(lpVersionInformation->szCSDVersion) / sizeof(lpVersionInformation->szCSDVersion[0])) - 1; - i = _snwprintf(lpVersionInformation->szCSDVersion, - MaxLength, - L"Service Pack %d", - ((CmNtCSDVersion >> 8) & 0xFF)); - if (i < 0) + LONG i; + ULONG MaxLength; + + if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) || + lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) + { + lpVersionInformation->dwMajorVersion = NtMajorVersion; + lpVersionInformation->dwMinorVersion = NtMinorVersion; + lpVersionInformation->dwBuildNumber = NtBuildNumber; + lpVersionInformation->dwPlatformId = VER_PLATFORM_WIN32_NT; + RtlZeroMemory(lpVersionInformation->szCSDVersion, sizeof(lpVersionInformation->szCSDVersion)); + + if(((CmNtCSDVersion >> 8) & 0xFF) != 0) { - /* null-terminate if it was overflowed */ - lpVersionInformation->szCSDVersion[MaxLength] = L'\0'; + MaxLength = (sizeof(lpVersionInformation->szCSDVersion) / sizeof(lpVersionInformation->szCSDVersion[0])) - 1; + i = _snwprintf(lpVersionInformation->szCSDVersion, + MaxLength, + L"Service Pack %d", + ((CmNtCSDVersion >> 8) & 0xFF)); + if (i < 0) + { + /* Null-terminate if it was overflowed */ + lpVersionInformation->szCSDVersion[MaxLength] = L'\0'; + } } - } - if (lpVersionInformation->dwOSVersionInfoSize == sizeof(OSVERSIONINFOEXW)) - { - RTL_OSVERSIONINFOEXW *InfoEx = (RTL_OSVERSIONINFOEXW *)lpVersionInformation; - InfoEx->wServicePackMajor = (USHORT)(CmNtCSDVersion >> 8) & 0xFF; - InfoEx->wServicePackMinor = (USHORT)(CmNtCSDVersion & 0xFF); - InfoEx->wSuiteMask = (USHORT)(SharedUserData->SuiteMask & 0xFFFF); - InfoEx->wProductType = SharedUserData->NtProductType; - } - return STATUS_SUCCESS; - } + if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW)) + { + PRTL_OSVERSIONINFOEXW InfoEx = (PRTL_OSVERSIONINFOEXW)lpVersionInformation; + InfoEx->wServicePackMajor = (USHORT)(CmNtCSDVersion >> 8) & 0xFF; + InfoEx->wServicePackMinor = (USHORT)(CmNtCSDVersion & 0xFF); + InfoEx->wSuiteMask = (USHORT)(SharedUserData->SuiteMask & 0xFFFF); + InfoEx->wProductType = SharedUserData->NtProductType; + InfoEx->wReserved = 0; + } - return STATUS_INVALID_PARAMETER; + return STATUS_SUCCESS; + } + + return STATUS_INVALID_PARAMETER; } +/* EOF */
12 years, 1 month
1
0
0
0
← Newer
1
...
10
11
12
13
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
Results per page:
10
25
50
100
200