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
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
August 2009
----- 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
21 participants
654 discussions
Start a n
N
ew thread
[jimtabor] 42746: - [Win32k] Removed W32THREADINFO. - Tested AbiWord, User32 wine tests. Yes, of course, this needs more testing.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Aug 16 23:44:59 2009 New Revision: 42746 URL:
http://svn.reactos.org/svn/reactos?rev=42746&view=rev
Log: - [Win32k] Removed W32THREADINFO. - Tested AbiWord, User32 wine tests. Yes, of course, this needs more testing. Modified: trunk/reactos/dll/win32/user32/include/user32.h trunk/reactos/dll/win32/user32/include/user32p.h trunk/reactos/dll/win32/user32/misc/dllmain.c trunk/reactos/dll/win32/user32/misc/misc.c trunk/reactos/dll/win32/user32/windows/hook.c trunk/reactos/dll/win32/user32/windows/message.c trunk/reactos/dll/win32/user32/windows/window.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/include/object.h trunk/reactos/subsystems/win32/win32k/include/win32.h trunk/reactos/subsystems/win32/win32k/include/window.h trunk/reactos/subsystems/win32/win32k/main/dllmain.c trunk/reactos/subsystems/win32/win32k/ntuser/class.c trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/hook.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c trunk/reactos/subsystems/win32/win32k/ntuser/misc.c trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c trunk/reactos/subsystems/win32/win32k/ntuser/timer.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c Modified: trunk/reactos/dll/win32/user32/include/user32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
============================================================================== --- trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -100,7 +100,7 @@ static __inline PDESKTOPINFO GetThreadDesktopInfo(VOID) { - PW32THREADINFO ti; + PTHREADINFO ti; PDESKTOPINFO di = NULL; ti = GetW32ThreadInfo(); Modified: trunk/reactos/dll/win32/user32/include/user32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
============================================================================== --- trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -199,7 +199,7 @@ union { PVOID pi; - PW32THREADINFO pti; // pointer to Win32ThreadInfo + PTHREADINFO pti; // pointer to Win32ThreadInfo PPROCESSINFO ppi; // pointer to W32ProcessInfo }; unsigned short type; /* object type (0 if free) */ Modified: trunk/reactos/dll/win32/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/dllm…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/dllmain.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -335,7 +335,7 @@ USERCONNECT UserCon; // ERR("GetConnected\n"); - if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL) + if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL) NtUserGetThreadState(THREADSTATE_GETTHREADINFO); if (gpsi && g_ppi) return; Modified: trunk/reactos/dll/win32/user32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
============================================================================== --- trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -104,17 +104,17 @@ return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable); } -PW32THREADINFO +PTHREADINFO GetW32ThreadInfo(VOID) { - PW32THREADINFO ti; - - ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo; + PTHREADINFO ti; + + ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo; if (ti == NULL) { - /* create the W32THREADINFO structure */ + /* create the THREADINFO structure */ NtUserGetThreadState(THREADSTATE_GETTHREADINFO); - ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo; + ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo; } return ti; @@ -250,13 +250,13 @@ IsGUIThread( BOOL bConvert) { - PW32THREADINFO ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo; + PTHREADINFO ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo; if (ti == NULL) { if(bConvert) { NtUserGetThreadState(THREADSTATE_GETTHREADINFO); - if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo) return TRUE; + if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo) return TRUE; else SetLastError(ERROR_NOT_ENOUGH_MEMORY); } @@ -270,7 +270,7 @@ FASTCALL TestWindowProcess(PWND Wnd) { - if (Wnd->head.pti == (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo) + if (Wnd->head.pti == (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo) return TRUE; else return (NtUserQueryWindow(Wnd->head.h, QUERY_WINDOW_UNIQUE_PROCESS_ID) == Modified: trunk/reactos/dll/win32/user32/windows/hook.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/h…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -369,7 +369,7 @@ IsWinEventHookInstalled( DWORD event) { - if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo) + if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo) { return (gpsi->dwInstalledEventHooks & GetMaskFromEvent(event)) != 0; } Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1333,7 +1333,7 @@ if (lpmsg->hwnd != NULL) { Wnd = ValidateHwnd(lpmsg->hwnd); - if (!Wnd || SharedPtrToUser(Wnd->head.pti) != GetW32ThreadInfo()) + if (!Wnd || Wnd->head.pti != GetW32ThreadInfo()) return 0; } else @@ -1394,7 +1394,7 @@ if (lpmsg->hwnd != NULL) { Wnd = ValidateHwnd(lpmsg->hwnd); - if (!Wnd || SharedPtrToUser(Wnd->head.pti) != GetW32ThreadInfo()) + if (!Wnd || Wnd->head.pti != GetW32ThreadInfo()) return 0; } else @@ -1791,10 +1791,10 @@ if (Wnd != HWND_BROADCAST && (Msg < WM_DDE_FIRST || Msg > WM_DDE_LAST)) { PWND Window; - PW32THREADINFO ti = GetW32ThreadInfo(); + PTHREADINFO ti = GetW32ThreadInfo(); Window = ValidateHwnd(Wnd); - if (Window != NULL && SharedPtrToUser(Window->head.pti) == ti && !IsThreadHooked(GetWin32ClientInfo())) + if (Window != NULL && Window->head.pti == ti && !IsThreadHooked(GetWin32ClientInfo())) { /* NOTE: We can directly send messages to the window procedure if *all* the following conditions are met: @@ -1855,10 +1855,10 @@ if (Wnd != HWND_BROADCAST && (Msg < WM_DDE_FIRST || Msg > WM_DDE_LAST)) { PWND Window; - PW32THREADINFO ti = GetW32ThreadInfo(); + PTHREADINFO ti = GetW32ThreadInfo(); Window = ValidateHwnd(Wnd); - if (Window != NULL && SharedPtrToUser(Window->head.pti) == ti && !IsThreadHooked(GetWin32ClientInfo())) + if (Window != NULL && Window->head.pti == ti && !IsThreadHooked(GetWin32ClientInfo())) { /* NOTE: We can directly send messages to the window procedure if *all* the following conditions are met: Modified: trunk/reactos/dll/win32/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1316,12 +1316,12 @@ LPDWORD lpdwProcessId) { DWORD Ret = 0; - PW32THREADINFO ti; + PTHREADINFO ti; PWND pWnd = ValidateHwnd(hWnd); if (!pWnd) return Ret; - ti = SharedPtrToUser(pWnd->head.pti); + ti = pWnd->head.pti; if (ti) { Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -2,6 +2,7 @@ #define __WIN32K_NTUSER_H typedef struct _PROCESSINFO *PPROCESSINFO; +typedef struct _THREADINFO *PTHREADINFO; struct _DESKTOP; struct _WND; @@ -72,13 +73,6 @@ DWORD dwcPumpHook; } CLIENTTHREADINFO, *PCLIENTTHREADINFO; -typedef struct _W32THREADINFO -{ - PPROCESSINFO ppi; /* [KERNEL] */ - PDESKTOPINFO pDeskInfo; - ULONG fsHooks; -} W32THREADINFO, *PW32THREADINFO; - typedef struct _HEAD { HANDLE h; @@ -88,7 +82,7 @@ typedef struct _THROBJHEAD { HEAD; - PW32THREADINFO pti; + PTHREADINFO pti; } THROBJHEAD, *PTHROBJHEAD; typedef struct _THRDESKHEAD @@ -701,7 +695,7 @@ LUID luid; } BROADCASTPARM, *PBROADCASTPARM; -PW32THREADINFO GetW32ThreadInfo(VOID); +PTHREADINFO GetW32ThreadInfo(VOID); PPROCESSINFO GetW32ProcessInfo(VOID); typedef struct _WNDMSG Modified: trunk/reactos/subsystems/win32/win32k/include/object.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/object.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/object.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -22,7 +22,7 @@ union { PVOID pi; - PW32THREADINFO pti; // pointer to Win32ThreadInfo + PTHREADINFO pti; // pointer to Win32ThreadInfo PPROCESSINFO ppi; // pointer to W32ProcessInfo }; unsigned short type; /* object type (0 if free) */ Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -88,8 +88,7 @@ LIST_ENTRY W32CallbackListHead; BOOLEAN IsExiting; SINGLE_LIST_ENTRY ReferencesList; - PW32THREADINFO ThreadInfo; -} THREADINFO, *PTHREADINFO; +} THREADINFO; #include <poppack.h> Modified: trunk/reactos/subsystems/win32/win32k/include/window.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -26,7 +26,7 @@ PWND Wnd; /* Pointer to the thread information */ - PW32THREADINFO ti; + PTHREADINFO ti; /* Pointer to the desktop */ PDESKTOPINFO Desktop; /* system menu handle. */ Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -306,12 +306,6 @@ IntSetThreadDesktop(NULL, TRUE); - if (Win32Thread->ThreadInfo != NULL) - { - UserHeapFree(Win32Thread->ThreadInfo); - Win32Thread->ThreadInfo = NULL; - } - PsSetThreadWin32Thread(Thread, NULL); } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1171,7 +1171,6 @@ IN DWORD dwFlags) { PTHREADINFO pti; - PW32THREADINFO ti; PPROCESSINFO pi; PCLS Class; RTL_ATOM ClassAtom; @@ -1179,15 +1178,14 @@ /* NOTE: Accessing the buffers in ClassName and MenuName may raise exceptions! */ - pti = PsGetCurrentThreadWin32Thread(); - ti = GetW32ThreadInfo(); - if (ti == NULL || !RegisteredSysClasses) + pti = GetW32ThreadInfo(); + if (pti == NULL || !RegisteredSysClasses) { SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); return (RTL_ATOM)0; } - pi = ti->ppi; + pi = pti->ppi; /* try to find a previously registered class */ ClassAtom = IntGetClassAtom(ClassName, Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1846,7 +1846,7 @@ static NTSTATUS IntUnmapDesktopView(IN PDESKTOP DesktopObject) { - PW32THREADINFO ti; + PTHREADINFO ti; PPROCESSINFO CurrentWin32Process; PW32HEAP_USER_MAPPING HeapMapping, *PrevLink; NTSTATUS Status = STATUS_SUCCESS; @@ -1883,10 +1883,6 @@ ti = GetW32ThreadInfo(); if (ti != NULL) { - if (ti->pDeskInfo == DesktopObject->DesktopInfo) - { - ti->pDeskInfo = NULL; - } GetWin32ClientInfo()->pDeskInfo = NULL; } GetWin32ClientInfo()->ulClientDelta = 0; @@ -1897,7 +1893,7 @@ static NTSTATUS IntMapDesktopView(IN PDESKTOP DesktopObject) { - PW32THREADINFO ti; + PTHREADINFO ti; PPROCESSINFO CurrentWin32Process; PW32HEAP_USER_MAPPING HeapMapping, *PrevLink; PVOID UserBase = NULL; @@ -1965,11 +1961,11 @@ GetWin32ClientInfo()->ulClientDelta = DesktopHeapGetUserDelta(); if (ti != NULL) { - if (ti->pDeskInfo == NULL) + if (GetWin32ClientInfo()->pDeskInfo == NULL) { - ti->pDeskInfo = DesktopObject->DesktopInfo; GetWin32ClientInfo()->pDeskInfo = - (PVOID)((ULONG_PTR)ti->pDeskInfo - GetWin32ClientInfo()->ulClientDelta); + (PVOID)((ULONG_PTR)DesktopObject->DesktopInfo - + GetWin32ClientInfo()->ulClientDelta); } } @@ -2009,15 +2005,6 @@ { SetLastNtError(Status); return FALSE; - } - } - - if (W32Thread->Desktop == NULL) - { - PW32THREADINFO ti = GetW32ThreadInfo(); - if (ti != NULL) - { - ti->pDeskInfo = NULL; } } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -117,9 +117,6 @@ W32Thread->fsHooks |= HOOKID_TO_FLAG(HookId); GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks; - - if (W32Thread->ThreadInfo != NULL) - W32Thread->ThreadInfo->fsHooks = W32Thread->fsHooks; } RtlInitUnicodeString(&Hook->ModuleName, NULL); @@ -242,9 +239,6 @@ W32Thread->fsHooks &= ~HOOKID_TO_FLAG(Hook->HookId); GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks; - - if (W32Thread->ThreadInfo != NULL) - W32Thread->ThreadInfo->fsHooks = W32Thread->fsHooks; if (0 != Table->Counts[HOOKID_TO_INDEX(Hook->HookId)]) { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1,21 +1,3 @@ -/* - * ReactOS W32 Subsystem - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -307,7 +289,7 @@ { BOOL SameThread = FALSE; - if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->ThreadInfo) + if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())) SameThread = TRUE; if ((!SameThread && (Window->ti->fsHooks & HOOKID_TO_FLAG(WH_CALLWNDPROC))) || @@ -329,7 +311,7 @@ { BOOL SameThread = FALSE; - if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->ThreadInfo) + if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())) SameThread = TRUE; if ((!SameThread && (Window->ti->fsHooks & HOOKID_TO_FLAG(WH_CALLWNDPROCRET))) || Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -451,11 +451,10 @@ return (PPROCESSINFO)PsGetCurrentProcessWin32Process(); } -PW32THREADINFO +PTHREADINFO GetW32ThreadInfo(VOID) { PTEB Teb; - PW32THREADINFO ti; PPROCESSINFO ppi; PCLIENTINFO pci; PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); @@ -465,67 +464,49 @@ /* FIXME - temporary hack for system threads... */ return NULL; } - - /* allocate a THREADINFO structure if neccessary */ - if (pti->ThreadInfo == NULL) + /* initialize it */ + pti->ppi = ppi = GetW32ProcessInfo(); + + pti->pcti = &pti->cti; // FIXME Need to set it in desktop.c! + + if (pti->Desktop != NULL) { - ti = UserHeapAlloc(sizeof(W32THREADINFO)); - if (ti != NULL) + pti->pDeskInfo = pti->Desktop->DesktopInfo; + } + else + { + pti->pDeskInfo = NULL; + } + /* update the TEB */ + Teb = NtCurrentTeb(); + pci = GetWin32ClientInfo(); + pti->pClientInfo = pci; + _SEH2_TRY + { + ProbeForWrite( Teb, + sizeof(TEB), + sizeof(ULONG)); + + Teb->Win32ThreadInfo = (PW32THREAD) pti; + + pci->pClientThreadInfo = NULL; // FIXME Need to set it in desktop.c! + pci->ppi = ppi; + pci->fsHooks = pti->fsHooks; + /* CI may not have been initialized. */ + if (!pci->pDeskInfo && pti->pDeskInfo) { - RtlZeroMemory(ti, - sizeof(W32THREADINFO)); - - /* initialize it */ - ti->ppi = ppi = GetW32ProcessInfo(); - ti->fsHooks = pti->fsHooks; - pti->pcti = &pti->cti; // FIXME Need to set it in desktop.c! - if (pti->Desktop != NULL) - { - pti->pDeskInfo = ti->pDeskInfo = pti->Desktop->DesktopInfo; - } - else - { - pti->pDeskInfo = ti->pDeskInfo = NULL; - } - - pti->ThreadInfo = ti; - /* update the TEB */ - Teb = NtCurrentTeb(); - pci = GetWin32ClientInfo(); - pti->pClientInfo = pci; - _SEH2_TRY - { - ProbeForWrite(Teb, - sizeof(TEB), - sizeof(ULONG)); - - Teb->Win32ThreadInfo = UserHeapAddressToUser(pti->ThreadInfo); - - pci->pClientThreadInfo = NULL; // FIXME Need to set it in desktop.c! - pci->ppi = ppi; - pci->fsHooks = pti->fsHooks; - /* CI may not have been initialized. */ - if (!pci->pDeskInfo && pti->pDeskInfo) - { - if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta(); - - pci->pDeskInfo = - (PVOID)((ULONG_PTR)pti->pDeskInfo - pci->ulClientDelta); - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - } - _SEH2_END; - } - else - { - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta(); + + pci->pDeskInfo = (PVOID)((ULONG_PTR)pti->pDeskInfo - pci->ulClientDelta); } } - - return pti->ThreadInfo; + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastNtError(_SEH2_GetExceptionCode()); + } + _SEH2_END; + + return pti; } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -164,7 +164,7 @@ case ONEPARAM_ROUTINE_GETDESKTOPMAPPING: { - PW32THREADINFO ti; + PTHREADINFO ti; ti = GetW32ThreadInfo(); if (ti != NULL) { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -1,21 +1,3 @@ -/* - * ReactOS W32 Subsystem - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -162,7 +144,8 @@ { if ( (lParam == (LPARAM)pTmr->pfn) && (pTmr->flags & (TMRF_SYSTEM|TMRF_RIT)) && - (pTmr->pti->ThreadInfo->ppi == pti->ThreadInfo->ppi) ) +// (pTmr->head.pti->ppi == pti->ppi) ) + (pTmr->pti->ppi == pti->ppi) ) break; pTmr = (PTIMER)pTmr->ptmrList.Flink; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sun Aug 16 23:44:59 2009 @@ -103,7 +103,7 @@ /* temp hack */ PWINDOW_OBJECT FASTCALL UserGetWindowObject(HWND hWnd) { - PW32THREADINFO ti; + PTHREADINFO ti; PWINDOW_OBJECT Window; if (PsGetCurrentProcess() != PsInitialSystemProcess) @@ -314,7 +314,7 @@ } static VOID -UserFreeWindowInfo(PW32THREADINFO ti, PWINDOW_OBJECT WindowObject) +UserFreeWindowInfo(PTHREADINFO ti, PWINDOW_OBJECT WindowObject) { PCLIENTINFO ClientInfo = GetWin32ClientInfo(); PWND Wnd = WindowObject->Wnd; @@ -1551,7 +1551,7 @@ HWND hWnd; POINT Pos; SIZE Size; - PW32THREADINFO ti = NULL; + PTHREADINFO ti = NULL; #if 0 POINT MaxSize, MaxPos, MinTrack, MaxTrack; @@ -3311,7 +3311,7 @@ DECLARE_RETURN(BOOL); USER_REFERENCE_ENTRY Ref; NTSTATUS Status; - PW32THREADINFO ti; + PTHREADINFO ti; DPRINT("Enter NtUserSetShellWindowEx\n"); UserEnterExclusive();
15 years, 1 month
1
0
0
0
[gschneider] 42745: Handle failure of EngLockSurface as well
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 22:11:31 2009 New Revision: 42745 URL:
http://svn.reactos.org/svn/reactos?rev=42745&view=rev
Log: Handle failure of EngLockSurface as well Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] Sun Aug 16 22:11:31 2009 @@ -76,6 +76,11 @@ } *ppsoOutput = EngLockSurface((HSURF)EnterLeave->OutputBitmap); + if (*ppsoOutput == NULL) + { + EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); + return FALSE; + } EnterLeave->DestRect.left = 0; EnterLeave->DestRect.top = 0; @@ -105,9 +110,9 @@ EnterLeave->TrivialClipObj = EngCreateClip(); if (EnterLeave->TrivialClipObj == NULL) { - EngUnlockSurface(*ppsoOutput); - EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); - return FALSE; + EngUnlockSurface(*ppsoOutput); + EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); + return FALSE; } EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL; if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&
15 years, 1 month
1
0
0
0
[sginsberg] 42744: - Revert 32309 -- instead of removing FORCEINLINE to make GCC happy (it can't inline functions using va_list), use __inline to merely hint that the function should be inlined. This lets you use RtlStringCbPrintfA and RtlStringCbPrintfExA in multiple source files as the functions aren't static. - Moreover, there is no reason to forceinline all the RtlString* routines -- they are quite big and the compiler should be allowed to optimize here as it likes, so just use __inline. Als
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Aug 16 22:08:48 2009 New Revision: 42744 URL:
http://svn.reactos.org/svn/reactos?rev=42744&view=rev
Log: - Revert 32309 -- instead of removing FORCEINLINE to make GCC happy (it can't inline functions using va_list), use __inline to merely hint that the function should be inlined. This lets you use RtlStringCbPrintfA and RtlStringCbPrintfExA in multiple source files as the functions aren't static. - Moreover, there is no reason to forceinline all the RtlString* routines -- they are quite big and the compiler should be allowed to optimize here as it likes, so just use __inline. Also add RtlStringCchCopyA and re-enable ASSERTMSG and use it for the stubs. - Add missing GUID_CLASS_COMPORT and GUID_SERENUM_BUS_ENUMERATOR to ntddser.h - Add driverspecs.h to stub out Driver Verifier annotations - The WDK serenum source sample now compiles with our header set. Added: trunk/reactos/include/ddk/driverspecs.h (with props) Modified: trunk/reactos/include/ddk/ntddser.h trunk/reactos/include/ddk/ntstrsafe.h trunk/reactos/ntoskrnl/mm/sysldr.c Added: trunk/reactos/include/ddk/driverspecs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/driverspecs.h?…
============================================================================== --- trunk/reactos/include/ddk/driverspecs.h (added) +++ trunk/reactos/include/ddk/driverspecs.h [iso-8859-1] Sun Aug 16 22:08:48 2009 @@ -1,0 +1,29 @@ +/* + * PROJECT: ReactOS DDK + * COPYRIGHT: This file is in the Public Domain. + * FILE: driverspecs.h + * ABSTRACT: This header stubs out Driver Verifier annotations to + * allow drivers using them to compile with our header set. + */ + +// +// Stubs +// +#define __drv_dispatchType(x) +#define __drv_dispatchType_other + +// +// FIXME: These annotations are not driver-only and does not belong here +// +#define __in +#define __in_bcount(Size) +#define __in_ecount(Size) + +#define __out +#define __out_bcount(Size) +#define __out_bcount_part(Size, Length) +#define __out_ecount(Size) + +#define __inout + +#define __deref_out_ecount(Size) Propchange: trunk/reactos/include/ddk/driverspecs.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/ddk/ntddser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddser.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/ntddser.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddser.h [iso-8859-1] Sun Aug 16 22:08:48 2009 @@ -32,8 +32,12 @@ DEFINE_GUID(GUID_DEVINTERFACE_COMPORT, 0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73); +#define GUID_CLASS_COMPORT GUID_DEVINTERFACE_COMPORT + DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR, 0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18); + +#define GUID_SERENUM_BUS_ENUMERATOR GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR #define IOCTL_SERIAL_CLEAR_STATS \ CTL_CODE (FILE_DEVICE_SERIAL_PORT, 36, METHOD_BUFFERED, FILE_ANY_ACCESS) Modified: trunk/reactos/include/ddk/ntstrsafe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntstrsafe.h?re…
============================================================================== --- trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntstrsafe.h [iso-8859-1] Sun Aug 16 22:08:48 2009 @@ -31,13 +31,9 @@ // typedef unsigned long DWORD; -#ifndef UNIMPLEMENTED -#define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__); -#endif - /* PRIVATE FUNCTIONS *********************************************************/ -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringLengthWorkerA(IN PCHAR String, @@ -70,7 +66,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringValidateDestA(IN PCHAR Destination, @@ -99,7 +95,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringExValidateDestA(IN OUT PCHAR *Destination, @@ -108,14 +104,14 @@ IN SIZE_T MaxLength, IN DWORD Flags) { - //ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); + ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); return RtlStringValidateDestA(*Destination, *DestinationLength, ReturnLength, MaxLength); } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringExValidateSrcA(IN OUT PCCHAR *Source OPTIONAL, @@ -124,7 +120,7 @@ IN DWORD Flags) { NTSTATUS Status = STATUS_SUCCESS; - //ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); + ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); if ((ReturnLength) && (*ReturnLength >= MaxLength)) { @@ -134,7 +130,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringVPrintfWorkerA(OUT PCHAR Destination, @@ -175,7 +171,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringCopyWorkerA(OUT PCHAR Destination, @@ -212,6 +208,18 @@ /* PUBLIC FUNCTIONS **********************************************************/ +__inline +NTSTATUS +NTAPI +RtlStringCchCopyA(IN PCHAR Destination, + IN SIZE_T cchDest, + IN PCCHAR pszSrc) +{ + ASSERTMSG("RtlStringCchCopyA is UNIMPLEMENTED!\n", FALSE); + return STATUS_NOT_IMPLEMENTED; +} + +__inline NTSTATUS NTAPI RtlStringCbPrintfA(OUT PCHAR Destination, @@ -241,6 +249,7 @@ return Status; } +__inline NTSTATUS NTAPI RtlStringCbPrintfExA(OUT PCHAR Destination, @@ -255,7 +264,7 @@ SIZE_T CharLength = Length / sizeof(CHAR), Remaining, LocalNewLength = 0; PCHAR LocalDestinationEnd; va_list argList; - //ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); + ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); Status = RtlStringExValidateDestA(&Destination, &CharLength, @@ -321,7 +330,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringCbCopyExA(OUT PCHAR Destination, @@ -334,7 +343,7 @@ NTSTATUS Status; SIZE_T CharLength = Length / sizeof(CHAR), Copied = 0, Remaining; PCHAR LocalDestinationEnd; - //ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); + ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); Status = RtlStringExValidateDestA(&Destination, &Length, @@ -398,7 +407,7 @@ return Status; } - +__inline NTSTATUS NTAPI RtlStringCbPrintfW( @@ -407,11 +416,11 @@ IN LPCWSTR pszFormat, ...) { - UNIMPLEMENTED + ASSERTMSG("RtlStringCbPrintfW is UNIMPLEMENTED!\n", FALSE); return STATUS_NOT_IMPLEMENTED; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringCbCatExA(IN OUT PCHAR Destination, @@ -425,7 +434,7 @@ SIZE_T CharLength = Length / sizeof(CHAR); SIZE_T DestinationLength, Remaining, Copied = 0; PCHAR LocalDestinationEnd; - //ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); + ASSERTMSG("We don't support Extended Flags yet!\n", Flags == 0); Status = RtlStringExValidateDestA(&Destination, &CharLength, @@ -485,7 +494,7 @@ return Status; } -FORCEINLINE +__inline NTSTATUS NTAPI RtlStringCbCopyA(OUT PCHAR Destination, Modified: trunk/reactos/ntoskrnl/mm/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/sysldr.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/sysldr.c [iso-8859-1] Sun Aug 16 22:08:48 2009 @@ -13,6 +13,7 @@ #include <debug.h> /* GCC's incompetence strikes again */ +__inline VOID sprintf_nt(IN PCHAR Buffer, IN PCHAR Format,
15 years, 1 month
1
0
0
0
[gschneider] 42743: Handle failure of EngCreateClip, spotted by Amine Khaldi
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 21:56:40 2009 New Revision: 42743 URL:
http://svn.reactos.org/svn/reactos?rev=42743&view=rev
Log: Handle failure of EngCreateClip, spotted by Amine Khaldi Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] Sun Aug 16 21:56:40 2009 @@ -103,6 +103,12 @@ ClippedDestRect.bottom = ClippedDestRect.top + psoDest->sizlBitmap.cy - SrcPoint.y; } EnterLeave->TrivialClipObj = EngCreateClip(); + if (EnterLeave->TrivialClipObj == NULL) + { + EngUnlockSurface(*ppsoOutput); + EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); + return FALSE; + } EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL; if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx && 0 <= ClippedDestRect.right && @@ -115,11 +121,11 @@ EnterLeave->TrivialClipObj, NULL, &ClippedDestRect, &SrcPoint)) { - EngDeleteClip(EnterLeave->TrivialClipObj); - EngFreeMem((*ppsoOutput)->pvBits); - EngUnlockSurface(*ppsoOutput); - EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); - return FALSE; + EngDeleteClip(EnterLeave->TrivialClipObj); + EngFreeMem((*ppsoOutput)->pvBits); + EngUnlockSurface(*ppsoOutput); + EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); + return FALSE; } EnterLeave->DestRect.left = DestRect->left; EnterLeave->DestRect.top = DestRect->top;
15 years, 1 month
1
0
0
0
[gschneider] 42742: - Copy the source rectangle after checking it - Create input rectangle from destination size if source is not used
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 21:43:58 2009 New Revision: 42742 URL:
http://svn.reactos.org/svn/reactos?rev=42742&view=rev
Log: - Copy the source rectangle after checking it - Create input rectangle from destination size if source is not used Modified: trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c Modified: trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c [iso-8859-1] Sun Aug 16 21:43:58 2009 @@ -1,6 +1,6 @@ /* * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel + * PROJECT: ReactOS Win32 kernelmode subsystem * PURPOSE: GDI stretch blt functions * FILE: subsystems/win32/win32k/eng/stretchblt.c * PROGRAMER: Jason Filby @@ -160,13 +160,13 @@ OutputRect.bottom = prclDest->top; } - InputRect = *prclSrc; if (UsesSource) { if (NULL == prclSrc) { return FALSE; } + InputRect = *prclSrc; if (! IntEngEnter(&EnterLeaveSource, psoSource, &InputRect, TRUE, &Translate, &psoInput)) @@ -178,6 +178,13 @@ InputRect.right += Translate.x; InputRect.top += Translate.y; InputRect.bottom += Translate.y; + } + else + { + InputRect.left = 0; + InputRect.right = OutputRect.right - OutputRect.left; + InputRect.top = 0; + InputRect.bottom = OutputRect.bottom - OutputRect.top; } if (NULL != ClipRegion)
15 years, 1 month
1
0
0
0
[gschneider] 42741: Allocate span memory for every clipping type, not only for one
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 21:20:50 2009 New Revision: 42741 URL:
http://svn.reactos.org/svn/reactos?rev=42741&view=rev
Log: Allocate span memory for every clipping type, not only for one Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] Sun Aug 16 21:20:50 2009 @@ -406,18 +406,21 @@ ASSERT(Boundary->top <= Boundary->bottom && Boundary->left <= Boundary->right); - *Spans = NULL; + *Count = Boundary->bottom - Boundary->top; + if (*Count > 0) + { + *Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP); + if (NULL == *Spans) + { + *Count = 0; + return FALSE; + } + } + if (NULL == ClipRegion || DC_TRIVIAL == ClipRegion->iDComplexity) { - *Count = Boundary->bottom - Boundary->top; if (0 != *Count) { - *Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP); - if (NULL == *Spans) - { - *Count = 0; - return FALSE; - } for (i = 0; i < Boundary->bottom - Boundary->top; i++) { (*Spans)[i].X = Boundary->left;
15 years, 1 month
1
0
0
0
[gschneider] 42740: Add some useful information to the popen header
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 20:58:25 2009 New Revision: 42740 URL:
http://svn.reactos.org/svn/reactos?rev=42740&view=rev
Log: Add some useful information to the popen header Modified: trunk/reactos/lib/sdk/crt/stdio/popen.c Modified: trunk/reactos/lib/sdk/crt/stdio/popen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/popen.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdio/popen.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdio/popen.c [iso-8859-1] Sun Aug 16 20:58:25 2009 @@ -1,11 +1,10 @@ /* * COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS system libraries -* FILE: lib/crt/?????? -* PURPOSE: Unknown -* PROGRAMER: Unknown -* UPDATE HISTORY: -* 25/11/05: Created +* PROJECT: ReactOS C runtime library +* FILE: lib/sdk/crt/stdio/popen.c +* PURPOSE: Pipe Functions +* PROGRAMERS: Eric Kohl + Hartmut Birr */ #include <precomp.h>
15 years, 1 month
1
0
0
0
[gschneider] 42739: Only set the pattern function pointer if the pattern surface is valid, spotted by Amine Khaldi
by gschneider@svn.reactos.org
Author: gschneider Date: Sun Aug 16 20:52:06 2009 New Revision: 42739 URL:
http://svn.reactos.org/svn/reactos?rev=42739&view=rev
Log: Only set the pattern function pointer if the pattern surface is valid, spotted by Amine Khaldi Modified: trunk/reactos/subsystems/win32/win32k/eng/bitblt.c Modified: trunk/reactos/subsystems/win32/win32k/eng/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] Sun Aug 16 20:52:06 2009 @@ -67,8 +67,8 @@ psoPattern = &psurfPattern->SurfObj; PatternWidth = psoPattern->sizlBitmap.cx; PatternHeight = psoPattern->sizlBitmap.cy; - } - fnPattern_GetPixel = DibFunctionsForBitmapFormat[psoPattern->iBitmapFormat].DIB_GetPixel; + fnPattern_GetPixel = DibFunctionsForBitmapFormat[psoPattern->iBitmapFormat].DIB_GetPixel; + } } else psurfPattern = NULL;
15 years, 1 month
1
0
0
0
[hyperion] 42738: Tests to exercise support for calling stack-allocated trampolines. All three tests pass
by hyperion@svn.reactos.org
Author: hyperion Date: Sun Aug 16 18:50:35 2009 New Revision: 42738 URL:
http://svn.reactos.org/svn/reactos?rev=42738&view=rev
Log: Tests to exercise support for calling stack-allocated trampolines. All three tests pass Modified: trunk/rostests/tests/pseh2/psehtest.c Modified: trunk/rostests/tests/pseh2/psehtest.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/psehtest.c?re…
============================================================================== --- trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] (original) +++ trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] Sun Aug 16 18:50:35 2009 @@ -2245,6 +2245,71 @@ _SEH2_END; return ret == return_positive() + return_one(); +} +//}}} + +/* Use of local variables from _SEH2_EXCEPT(...) and _SEH2_FINALLY { ... } *///{{{ +DEFINE_TEST(test_nested_locals_1) +{ + int var1 = return_one(); + + _SEH2_TRY + { + RaiseException(0xE00DEAD0, 0, 0, 0); + } + _SEH2_EXCEPT((var1 = (var1 == return_one() ? return_positive() : var1)), EXCEPTION_EXECUTE_HANDLER) + { + if(var1 == return_positive()) + var1 = return_positive() + 1; + } + _SEH2_END; + + return var1 == return_positive() + 1; +} + +DEFINE_TEST(test_nested_locals_2) +{ + int var1 = return_positive(); + + _SEH2_TRY + { + } + _SEH2_FINALLY + { + if(var1 == return_positive()) + var1 = return_positive() + 1; + } + _SEH2_END; + + return var1 == return_positive() + 1; +} + +DEFINE_TEST(test_nested_locals_3) +{ + int var1 = return_zero(); + + _SEH2_TRY + { + _SEH2_TRY + { + var1 = return_one(); + RaiseException(0xE00DEAD0, 0, 0, 0); + } + _SEH2_FINALLY + { + if(var1 == return_one()) + var1 = return_positive(); + } + _SEH2_END; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + if(var1 == return_positive()) + var1 = return_positive() + 1; + } + _SEH2_END; + + return var1 == return_positive() + 1; } //}}} @@ -2567,6 +2632,10 @@ USE_TEST(test_abnorm_7), USE_TEST(test_abnorm_8), + USE_TEST(test_nested_locals_1), + USE_TEST(test_nested_locals_2), + USE_TEST(test_nested_locals_3), + USE_TEST(test_bug_4004), USE_TEST(test_bug_4663), };
15 years, 1 month
1
0
0
0
[hyperion] 42737: modified include/reactos/libs/pseh/pseh2.h Trampoline-related definitions are no longer necessary in the public header modified lib/pseh/i386/framebased-gcchack.c Don't use byte arrays when you mean unaligned field, Arch: use __attribute__((packed)) instead, and gcc will thank you for not violating strong aliasing
by hyperion@svn.reactos.org
Author: hyperion Date: Sun Aug 16 18:40:52 2009 New Revision: 42737 URL:
http://svn.reactos.org/svn/reactos?rev=42737&view=rev
Log: modified include/reactos/libs/pseh/pseh2.h Trampoline-related definitions are no longer necessary in the public header modified lib/pseh/i386/framebased-gcchack.c Don't use byte arrays when you mean unaligned field, Arch: use __attribute__((packed)) instead, and gcc will thank you for not violating strong aliasing Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h trunk/reactos/lib/pseh/i386/framebased-gcchack.c Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Sun Aug 16 18:40:52 2009 @@ -85,43 +85,6 @@ #ifdef __cplusplus } -#endif - -#if defined(__i386__) -typedef struct __SEHTrampoline -{ - unsigned char STR_MovEcx; - unsigned char STR_Closure[4]; - unsigned char STR_Jmp; - unsigned char STR_Function[4]; -} -_SEHTrampoline_t; - -static -__inline__ -__attribute__((always_inline)) -int _SEHIsTrampoline(_SEHTrampoline_t * trampoline_) -{ - return trampoline_->STR_MovEcx == 0xb9 && trampoline_->STR_Jmp == 0xe9; -} - -static -__inline__ -__attribute__((always_inline)) -void * _SEHFunctionFromTrampoline(_SEHTrampoline_t * trampoline_) -{ - return (void *)(*(int *)(&trampoline_->STR_Function[0]) + (int)(trampoline_ + 1)); -} - -static -__inline__ -__attribute__((always_inline)) -void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_) -{ - return (void *)*(int *)(&trampoline_->STR_Closure[0]); -} -#else -#error TODO #endif /* A no-op side effect that scares GCC */ Modified: trunk/reactos/lib/pseh/i386/framebased-gcchack.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/framebased-g…
============================================================================== --- trunk/reactos/lib/pseh/i386/framebased-gcchack.c [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/i386/framebased-gcchack.c [iso-8859-1] Sun Aug 16 18:40:52 2009 @@ -41,6 +41,34 @@ extern DECLSPEC_NORETURN int __SEH2Handle(void *, void *, void *, void *, void *, void *); extern int __cdecl __SEH2FrameHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); extern int __cdecl __SEH2UnwindHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); + +typedef struct __SEHTrampoline +{ + unsigned char STR_MovEcx; + unsigned char * STR_Closure; + unsigned char STR_Jmp; + unsigned char * STR_Function; +} +__attribute__((packed)) +_SEHTrampoline_t; + +FORCEINLINE +int _SEHIsTrampoline(_SEHTrampoline_t * trampoline_) +{ + return trampoline_->STR_MovEcx == 0xb9 && trampoline_->STR_Jmp == 0xe9; +} + +FORCEINLINE +void * _SEHFunctionFromTrampoline(_SEHTrampoline_t * trampoline_) +{ + return (int)(trampoline_ + 1) + trampoline_->STR_Function; +} + +FORCEINLINE +void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_) +{ + return trampoline_->STR_Closure; +} FORCEINLINE _SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void)
15 years, 1 month
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
66
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200