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
March 2011
----- 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
21 participants
276 discussions
Start a n
N
ew thread
[osiejka] 51196: [SHELL32] - Fix compile warning (uninitialized use). Based on patch by Edijs Kolesnikovics <terminedijs at yahoo dot com> slightly modified by Aleksiej See issue #6058 for more det...
by osiejka@svn.reactos.org
Author: osiejka Date: Tue Mar 29 21:41:14 2011 New Revision: 51196 URL:
http://svn.reactos.org/svn/reactos?rev=51196&view=rev
Log: [SHELL32] - Fix compile warning (uninitialized use). Based on patch by Edijs Kolesnikovics <terminedijs at yahoo dot com> slightly modified by Aleksiej See issue #6058 for more details. Modified: trunk/reactos/dll/win32/shell32/shlfileop.c Modified: trunk/reactos/dll/win32/shell32/shlfileop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfileo…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlfileop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfileop.c [iso-8859-1] Tue Mar 29 21:41:14 2011 @@ -584,7 +584,7 @@ QueueFile( FILE_OPERATION_CONTEXT * Context) { - FILE_ENTRY * from, *to; + FILE_ENTRY * from, *too = NULL; BOOL bRet = FALSE; if (Context->Index >= Context->from->dwNumFiles)
13 years, 8 months
1
0
0
0
[osiejka] 51195: [SYSSETUP] - Fix compilation warning. Patch by Edijs Kolesnikovics <terminedijs at yahoo dot com> See issue #6059 for more details.
by osiejka@svn.reactos.org
Author: osiejka Date: Tue Mar 29 21:21:18 2011 New Revision: 51195 URL:
http://svn.reactos.org/svn/reactos?rev=51195&view=rev
Log: [SYSSETUP] - Fix compilation warning. Patch by Edijs Kolesnikovics <terminedijs at yahoo dot com> See issue #6059 for more details. Modified: trunk/reactos/dll/win32/syssetup/wizard.c Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Tue Mar 29 21:21:18 2011 @@ -20,6 +20,7 @@ #include <shlobj.h> #define NTOS_MODE_USER #include <ndk/ntndk.h> +#include <time.h> #include <syssetup/syssetup.h>
13 years, 8 months
1
0
0
0
[tkreuzer] 51194: [WIN32K] Addendum to r51188: set last error, when overflow check fails. Fixes test regression.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 29 15:35:10 2011 New Revision: 51194 URL:
http://svn.reactos.org/svn/reactos?rev=51194&view=rev
Log: [WIN32K] Addendum to r51188: set last error, when overflow check fails. Fixes test regression. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Tue Mar 29 15:35:10 2011 @@ -84,11 +84,11 @@ Ret = NtGdiBitBlt( hdc, nXDest, nYDest, - nWidth, - nHeight, + nWidth, + nHeight, hSystemBM, - nXSrc, - nYSrc, + nXSrc, + nYSrc, dwRop, 0, 0); @@ -255,7 +255,7 @@ APIENTRY NtUserGetControlColor( HWND hwndParent, - HWND hwnd, + HWND hwnd, HDC hdc, UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush { @@ -380,7 +380,7 @@ DPRINT1("Failed reading Client Pfns from user space.\n"); SetLastNtError(Status); } - + UserLeave(); return Status; } @@ -543,8 +543,12 @@ if (cElements == 0) return TRUE; + /* We need this check to prevent overflow later */ if ((ULONG)cElements >= 0x40000000) + { + EngSetLastError(ERROR_NOACCESS); return FALSE; + } UserEnterExclusive();
13 years, 9 months
1
0
0
0
[fireball] 51193: [RTL] - Turn off LdrVerifyMappedImageMatchesChecksum() verification for now. (should have been part of r51192).
by fireball@svn.reactos.org
Author: fireball Date: Tue Mar 29 11:00:34 2011 New Revision: 51193 URL:
http://svn.reactos.org/svn/reactos?rev=51193&view=rev
Log: [RTL] - Turn off LdrVerifyMappedImageMatchesChecksum() verification for now. (should have been part of r51192). Modified: trunk/reactos/lib/rtl/image.c Modified: trunk/reactos/lib/rtl/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/image.c?rev=51193&…
============================================================================== --- trunk/reactos/lib/rtl/image.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/image.c [iso-8859-1] Tue Mar 29 11:00:34 2011 @@ -46,6 +46,7 @@ IN ULONG ImageSize, IN ULONG FileLength) { +#if 0 PIMAGE_NT_HEADERS Header; PUSHORT Ptr; ULONG Sum; @@ -118,6 +119,9 @@ DPRINT1("Image %p checksum mismatches! 0x%x != 0x%x, ImageSize %x, FileLen %x\n", BaseAddress, CalcSum, HeaderSum, ImageSize, FileLength); return (BOOLEAN)(CalcSum == HeaderSum); +#else + return TRUE; +#endif } /*
13 years, 9 months
1
0
0
0
[fireball] 51192: [NTOS/MM] - Remove IMG_SCN_TYPE_NOLOAD support which was firstly removed by Alex, then reenabled by Herve. Hopefully it works this time. - Return proper image size after successfu...
by fireball@svn.reactos.org
Author: fireball Date: Tue Mar 29 10:56:28 2011 New Revision: 51192 URL:
http://svn.reactos.org/svn/reactos?rev=51192&view=rev
Log: [NTOS/MM] - Remove IMG_SCN_TYPE_NOLOAD support which was firstly removed by Alex, then reenabled by Herve. Hopefully it works this time. - Return proper image size after successfully mapping an image section (previously, 0 was always returned). The change above is necessary for returning correct size. Modified: trunk/reactos/ntoskrnl/mm/section.c Modified: trunk/reactos/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Tue Mar 29 10:56:28 2011 @@ -4326,14 +4326,11 @@ * and calculate the image base address */ for (i = 0; i < NrSegments; i++) { - if (!(SectionSegments[i].Characteristics & IMAGE_SCN_TYPE_NOLOAD)) - { - if (Segment == &SectionSegments[i]) - { - ImageBaseAddress = (char*)BaseAddress - (ULONG_PTR)SectionSegments[i].VirtualAddress; - break; - } - } + if (Segment == &SectionSegments[i]) + { + ImageBaseAddress = (char*)BaseAddress - (ULONG_PTR)SectionSegments[i].VirtualAddress; + break; + } } if (i >= NrSegments) { @@ -4342,13 +4339,10 @@ for (i = 0; i < NrSegments; i++) { - if (!(SectionSegments[i].Characteristics & IMAGE_SCN_TYPE_NOLOAD)) - { - PVOID SBaseAddress = (PVOID) - ((char*)ImageBaseAddress + (ULONG_PTR)SectionSegments[i].VirtualAddress); - - Status = MmUnmapViewOfSegment(AddressSpace, SBaseAddress); - } + PVOID SBaseAddress = (PVOID) + ((char*)ImageBaseAddress + (ULONG_PTR)SectionSegments[i].VirtualAddress); + + Status = MmUnmapViewOfSegment(AddressSpace, SBaseAddress); } } else @@ -4625,13 +4619,10 @@ ImageSize = 0; for (i = 0; i < NrSegments; i++) { - if (!(SectionSegments[i].Characteristics & IMAGE_SCN_TYPE_NOLOAD)) - { - ULONG_PTR MaxExtent; - MaxExtent = (ULONG_PTR)SectionSegments[i].VirtualAddress + - SectionSegments[i].Length; - ImageSize = max(ImageSize, MaxExtent); - } + ULONG_PTR MaxExtent; + MaxExtent = (ULONG_PTR)SectionSegments[i].VirtualAddress + + SectionSegments[i].Length; + ImageSize = max(ImageSize, MaxExtent); } ImageSectionObject->ImageSize = ImageSize; @@ -4659,29 +4650,27 @@ for (i = 0; i < NrSegments; i++) { - if (!(SectionSegments[i].Characteristics & IMAGE_SCN_TYPE_NOLOAD)) - { - PVOID SBaseAddress = (PVOID) - ((char*)ImageBase + (ULONG_PTR)SectionSegments[i].VirtualAddress); - MmLockSectionSegment(&SectionSegments[i]); - Status = MmMapViewOfSegment(AddressSpace, - Section, - &SectionSegments[i], - &SBaseAddress, - SectionSegments[i].Length, - SectionSegments[i].Protection, - 0, - 0); - MmUnlockSectionSegment(&SectionSegments[i]); - if (!NT_SUCCESS(Status)) - { - MmUnlockAddressSpace(AddressSpace); - return(Status); - } - } + PVOID SBaseAddress = (PVOID) + ((char*)ImageBase + (ULONG_PTR)SectionSegments[i].VirtualAddress); + MmLockSectionSegment(&SectionSegments[i]); + Status = MmMapViewOfSegment(AddressSpace, + Section, + &SectionSegments[i], + &SBaseAddress, + SectionSegments[i].Length, + SectionSegments[i].Protection, + 0, + 0); + MmUnlockSectionSegment(&SectionSegments[i]); + if (!NT_SUCCESS(Status)) + { + MmUnlockAddressSpace(AddressSpace); + return(Status); + } } *BaseAddress = (PVOID)ImageBase; + *ViewSize = ImageSize; } else {
13 years, 9 months
1
0
0
0
[tkreuzer] 51191: [WIN32K] - Move IntGdiSetBrushOwner to brush.c - Move IntGdiSetDCOwnerEx to dclife.c - Move IntGdiSetRegionOwner to region.c
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 29 10:25:10 2011 New Revision: 51191 URL:
http://svn.reactos.org/svn/reactos?rev=51191&view=rev
Log: [WIN32K] - Move IntGdiSetBrushOwner to brush.c - Move IntGdiSetDCOwnerEx to dclife.c - Move IntGdiSetRegionOwner to region.c Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c trunk/reactos/subsystems/win32/win32k/objects/dclife.c trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c trunk/reactos/subsystems/win32/win32k/objects/region.c Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Tue Mar 29 10:25:10 2011 @@ -573,4 +573,53 @@ return TRUE; } +BOOL +FASTCALL +IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask) +{ + HBRUSH hBR; + PEPROCESS Owner = NULL; + PGDI_TABLE_ENTRY pEntry = NULL; + + if (!pbr) return FALSE; + + hBR = pbr->BaseObject.hHmgr; + + if (!hBR || (GDI_HANDLE_GET_TYPE(hBR) != GDI_OBJECT_TYPE_BRUSH)) + return FALSE; + else + { + INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hBR); + pEntry = &GdiHandleTable->Entries[Index]; + } + + if (pbr->flAttrs & GDIBRUSH_IS_GLOBAL) + { + GDIOBJ_ShareUnlockObjByPtr((POBJ)pbr); + return TRUE; + } + + if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) + { + // Set this Brush to inaccessible mode and to an Owner of NONE. +// if (OwnerMask == GDI_OBJ_HMGR_NONE) Owner = OwnerMask; + + if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, Owner)) + return FALSE; + + // Deny user access to User Data. + pEntry->UserData = NULL; // This hBR is inaccessible! + } + + if (OwnerMask == GDI_OBJ_HMGR_POWNED) + { + if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, PsGetCurrentProcess() )) + return FALSE; + + // Allow user access to User Data. + pEntry->UserData = pbr->pBrushAttr; + } + return TRUE; +} + /* EOF */ Modified: trunk/reactos/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Tue Mar 29 10:25:10 2011 @@ -836,7 +836,7 @@ { DPRINT1("Attempted to Delete 0x%x currently being destroyed!!!\n", hDC); } - + return TRUE; } @@ -973,3 +973,45 @@ return hDC; } +BOOL +FASTCALL +IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush) +{ + PDC pDC; + BOOL Ret = FALSE; + + if (!hDC || (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)) return FALSE; + + if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) + { + pDC = DC_LockDc ( hDC ); + MmCopyFromCaller(&pDC->dcattr, pDC->pdcattr, sizeof(DC_ATTR)); + DC_vFreeDcAttr(pDC); + DC_UnlockDc( pDC ); + + if (!DC_SetOwnership( hDC, NULL )) // This hDC is inaccessible! + return Ret; + } + + if (OwnerMask == GDI_OBJ_HMGR_POWNED) + { + pDC = DC_LockDc ( hDC ); + ASSERT(pDC->pdcattr == &pDC->dcattr); + DC_UnlockDc( pDC ); + + if (!DC_SetOwnership( hDC, PsGetCurrentProcess() )) return Ret; + + DC_AllocateDcAttr( hDC ); // Allocate new dcattr + + DCU_SynchDcAttrtoUser( hDC ); // Copy data from dc to dcattr + } + + if ((OwnerMask != GDI_OBJ_HMGR_NONE) && !NoSetBrush) + { + pDC = DC_LockDc ( hDC ); + if (IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrFill, OwnerMask)) + IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrLine, OwnerMask); + DC_UnlockDc( pDC ); + } + return TRUE; +} Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Mar 29 10:25:10 2011 @@ -1726,126 +1726,6 @@ /** PUBLIC FUNCTIONS **********************************************************/ -BOOL -FASTCALL -IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask) -{ - INT Index; - PGDI_TABLE_ENTRY Entry; -/* - System Regions: - These regions do not use attribute sections and when allocated, use gdiobj - level functions. - */ - // FIXME! HAX!!! Remove this once we get everything right! - Index = GDI_HANDLE_GET_INDEX(hRgn); - Entry = &GdiHandleTable->Entries[Index]; - if (Entry->UserData) FreeObjectAttr(Entry->UserData); - Entry->UserData = NULL; - // - if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) - { - return GDIOBJ_SetOwnership(hRgn, NULL); - } - if (OwnerMask == GDI_OBJ_HMGR_POWNED) - { - return GDIOBJ_SetOwnership((HGDIOBJ) hRgn, PsGetCurrentProcess() ); - } - return FALSE; -} - -BOOL -FASTCALL -IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask) -{ - HBRUSH hBR; - PEPROCESS Owner = NULL; - PGDI_TABLE_ENTRY pEntry = NULL; - - if (!pbr) return FALSE; - - hBR = pbr->BaseObject.hHmgr; - - if (!hBR || (GDI_HANDLE_GET_TYPE(hBR) != GDI_OBJECT_TYPE_BRUSH)) - return FALSE; - else - { - INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hBR); - pEntry = &GdiHandleTable->Entries[Index]; - } - - if (pbr->flAttrs & GDIBRUSH_IS_GLOBAL) - { - GDIOBJ_ShareUnlockObjByPtr((POBJ)pbr); - return TRUE; - } - - if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) - { - // Set this Brush to inaccessible mode and to an Owner of NONE. -// if (OwnerMask == GDI_OBJ_HMGR_NONE) Owner = OwnerMask; - - if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, Owner)) - return FALSE; - - // Deny user access to User Data. - pEntry->UserData = NULL; // This hBR is inaccessible! - } - - if (OwnerMask == GDI_OBJ_HMGR_POWNED) - { - if (!GDIOBJ_SetOwnership((HGDIOBJ) hBR, PsGetCurrentProcess() )) - return FALSE; - - // Allow user access to User Data. - pEntry->UserData = pbr->pBrushAttr; - } - return TRUE; -} - -BOOL -FASTCALL -IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush) -{ - PDC pDC; - BOOL Ret = FALSE; - - if (!hDC || (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)) return FALSE; - - if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) - { - pDC = DC_LockDc ( hDC ); - MmCopyFromCaller(&pDC->dcattr, pDC->pdcattr, sizeof(DC_ATTR)); - DC_vFreeDcAttr(pDC); - DC_UnlockDc( pDC ); - - if (!DC_SetOwnership( hDC, NULL )) // This hDC is inaccessible! - return Ret; - } - - if (OwnerMask == GDI_OBJ_HMGR_POWNED) - { - pDC = DC_LockDc ( hDC ); - ASSERT(pDC->pdcattr == &pDC->dcattr); - DC_UnlockDc( pDC ); - - if (!DC_SetOwnership( hDC, PsGetCurrentProcess() )) return Ret; - - DC_AllocateDcAttr( hDC ); // Allocate new dcattr - - DCU_SynchDcAttrtoUser( hDC ); // Copy data from dc to dcattr - } - - if ((OwnerMask != GDI_OBJ_HMGR_NONE) && !NoSetBrush) - { - pDC = DC_LockDc ( hDC ); - if (IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrFill, OwnerMask)) - IntGdiSetBrushOwner((PBRUSH)pDC->dclevel.pbrLine, OwnerMask); - DC_UnlockDc( pDC ); - } - return TRUE; -} - INT FASTCALL GreGetObjectOwner(HGDIOBJ Handle, GDIOBJTYPE ObjType) Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Tue Mar 29 10:25:10 2011 @@ -3942,4 +3942,32 @@ return size + sizeof(RGNDATAHEADER); } +BOOL +FASTCALL +IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask) +{ + INT Index; + PGDI_TABLE_ENTRY Entry; +/* + System Regions: + These regions do not use attribute sections and when allocated, use gdiobj + level functions. + */ + // FIXME! HAX!!! Remove this once we get everything right! + Index = GDI_HANDLE_GET_INDEX(hRgn); + Entry = &GdiHandleTable->Entries[Index]; + if (Entry->UserData) FreeObjectAttr(Entry->UserData); + Entry->UserData = NULL; + // + if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE) + { + return GDIOBJ_SetOwnership(hRgn, NULL); + } + if (OwnerMask == GDI_OBJ_HMGR_POWNED) + { + return GDIOBJ_SetOwnership((HGDIOBJ) hRgn, PsGetCurrentProcess() ); + } + return FALSE; +} + /* EOF */
13 years, 9 months
1
0
0
0
[tkreuzer] 51190: [WIN32K] Disable system service hooks, that got accidentally enabled.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 29 10:07:11 2011 New Revision: 51190 URL:
http://svn.reactos.org/svn/reactos?rev=51190&view=rev
Log: [WIN32K] Disable system service hooks, that got accidentally enabled. Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c 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] Tue Mar 29 10:07:11 2011 @@ -440,7 +440,7 @@ /* Register our per-process and per-thread structures. */ PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData); -#if 1 // DBG +#if 0 // DBG /* Register service hook callbacks */ KdSystemDebugControl('CsoR', DbgPreServiceHook, ID_Win32PreServiceHook, 0, 0, 0, 0); KdSystemDebugControl('CsoR', DbgPostServiceHook, ID_Win32PostServiceHook, 0, 0, 0, 0);
13 years, 9 months
1
0
0
0
[tkreuzer] 51189: [WIN32K] Make GdiTableSection a static variable and use it only from gdiobj.c
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 29 10:02:38 2011 New Revision: 51189 URL:
http://svn.reactos.org/svn/reactos?rev=51189&view=rev
Log: [WIN32K] Make GdiTableSection a static variable and use it only from gdiobj.c Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h trunk/reactos/subsystems/win32/win32k/main/dllmain.c trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] Tue Mar 29 10:02:38 2011 @@ -47,6 +47,7 @@ USHORT cExclusiveLock; USHORT BaseFlags; PTHREADINFO Tid; + EX_PUSH_LOCK pushlock; } BASEOBJECT, *POBJ; typedef struct _CLIENTOBJ @@ -62,8 +63,6 @@ BASEFLAG_READY_TO_DIE = 0x1000 }; -extern PSECTION_OBJECT GdiTableSection; - BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle); BOOL INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner); BOOL INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo); @@ -78,7 +77,7 @@ PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType); VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj); -PVOID INTERNAL_CALL GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process); +PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process); INIT_FUNCTION NTSTATUS 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] Tue Mar 29 10:02:38 2011 @@ -107,7 +107,7 @@ if(Process->Peb != NULL) { /* map the gdi handle table to user land */ - Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(GdiTableSection, Process); + Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(Process); Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT; } @@ -264,7 +264,7 @@ if (Win32Thread->KeyboardLayout) pci->hKL = Win32Thread->KeyboardLayout->hkl; pci->dwTIFlags = Win32Thread->TIF_flags; /* CI may not have been initialized. */ - if (!pci->pDeskInfo && Win32Thread->pDeskInfo) + if (!pci->pDeskInfo && Win32Thread->pDeskInfo) { if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta(); @@ -440,7 +440,7 @@ /* Register our per-process and per-thread structures. */ PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData); -#if 0 // DBG +#if 1 // DBG /* Register service hook callbacks */ KdSystemDebugControl('CsoR', DbgPreServiceHook, ID_Win32PreServiceHook, 0, 0, 0, 0); KdSystemDebugControl('CsoR', DbgPostServiceHook, ID_Win32PostServiceHook, 0, 0, 0, 0); Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Mar 29 10:02:38 2011 @@ -70,7 +70,7 @@ static LARGE_INTEGER ShortDelay; PGDI_HANDLE_TABLE GdiHandleTable = NULL; -PSECTION_OBJECT GdiTableSection = NULL; +static PSECTION_OBJECT GdiTableSection = NULL; /** INTERNAL FUNCTIONS ********************************************************/ @@ -1663,7 +1663,7 @@ } PVOID INTERNAL_CALL -GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process) +GDI_MapHandleTable(PEPROCESS Process) { PVOID MappedView = NULL; NTSTATUS Status; @@ -1672,10 +1672,10 @@ Offset.QuadPart = 0; - ASSERT(SectionObject != NULL); + ASSERT(GdiTableSection != NULL); ASSERT(Process != NULL); - Status = MmMapViewOfSection(SectionObject, + Status = MmMapViewOfSection(GdiTableSection, Process, &MappedView, 0,
13 years, 9 months
1
0
0
0
[tkreuzer] 51188: [WIN32K] Fix parameter check and buffer probing in NtUserSetSysColors
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 29 09:52:39 2011 New Revision: 51188 URL:
http://svn.reactos.org/svn/reactos?rev=51188&view=rev
Log: [WIN32K] Fix parameter check and buffer probing in NtUserSetSysColors Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Tue Mar 29 09:52:39 2011 @@ -539,37 +539,34 @@ FLONG Flags) { DWORD Ret = TRUE; - NTSTATUS Status = STATUS_SUCCESS; if (cElements == 0) return TRUE; + if ((ULONG)cElements >= 0x40000000) + return FALSE; + UserEnterExclusive(); + _SEH2_TRY { - ProbeForRead(lpaElements, - sizeof(INT), - 1); - ProbeForRead(lpaRgbValues, - sizeof(COLORREF), - 1); -// Developers: We are thread locked and calling gdi. + ProbeForRead(lpaElements, cElements * sizeof(INT), 1); + ProbeForRead(lpaRgbValues, cElements * sizeof(COLORREF), 1); + IntSetSysColors(cElements, lpaElements, lpaRgbValues); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); + SetLastNtError(_SEH2_GetExceptionCode()); + Ret = FALSE; } _SEH2_END; - if (!NT_SUCCESS(Status)) - { - SetLastNtError(Status); - Ret = FALSE; - } + if (Ret) { UserSendNotifyMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0); } + UserLeave(); return Ret; }
13 years, 9 months
1
0
0
0
[jimtabor] 51187: [User32|Win32k] - Properly implement RealGetWindowClass, fixes the ApiTest. Keeping the Ansi support for now, will use it as a reference.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Mar 29 05:53:34 2011 New Revision: 51187 URL:
http://svn.reactos.org/svn/reactos?rev=51187&view=rev
Log: [User32|Win32k] - Properly implement RealGetWindowClass, fixes the ApiTest. Keeping the Ansi support for now, will use it as a reference. Modified: trunk/reactos/dll/win32/user32/windows/class.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/ntuser/class.c Modified: trunk/reactos/dll/win32/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Tue Mar 29 05:53:34 2011 @@ -696,22 +696,20 @@ LPSTR lpClassName, int nMaxCount) { - ANSI_STRING ClassName; - int Result; - - ClassName.MaximumLength = nMaxCount; - ClassName.Buffer = lpClassName; - - Result = NtUserGetClassName(hWnd, - (PUNICODE_STRING)&ClassName, - TRUE); + WCHAR tmpbuf[MAX_ATOM_LEN + 1]; + int len; + + if (nMaxCount <= 0) return 0; + if (!GetClassNameW( hWnd, tmpbuf, sizeof(tmpbuf)/sizeof(WCHAR) )) return 0; + RtlUnicodeToMultiByteN( lpClassName, nMaxCount - 1, (PULONG)&len, tmpbuf, strlenW(tmpbuf) * sizeof(WCHAR) ); + lpClassName[len] = 0; TRACE("%p class/atom: %s/%04x %x\n", hWnd, IS_ATOM(lpClassName) ? NULL : lpClassName, IS_ATOM(lpClassName) ? lpClassName : 0, nMaxCount); - return Result; + return len; } @@ -732,8 +730,8 @@ ClassName.Buffer = lpClassName; Result = NtUserGetClassName(hWnd, - &ClassName, - FALSE); + FALSE, + &ClassName); TRACE("%p class/atom: %S/%04x %x\n", hWnd, IS_ATOM(lpClassName) ? NULL : lpClassName, @@ -914,8 +912,11 @@ LPWSTR pszType, UINT cchType) { - /* FIXME: Implement correct functionality of RealGetWindowClass */ - return GetClassNameW(hwnd,pszType,cchType); + UNICODE_STRING ClassName; + ClassName.MaximumLength = cchType * sizeof(WCHAR); + ClassName.Buffer = (PWSTR)pszType; + + return NtUserGetClassName(hwnd,TRUE,&ClassName); } @@ -929,8 +930,14 @@ LPSTR pszType, UINT cchType) { - /* FIXME: Implement correct functionality of RealGetWindowClass */ - return GetClassNameA(hwnd,pszType,cchType); + WCHAR tmpbuf[MAX_ATOM_LEN + 1]; + UINT len; + + if (cchType <= 0) return 0; + if (!RealGetWindowClassW( hwnd, tmpbuf, sizeof(tmpbuf)/sizeof(WCHAR) )) return 0; + RtlUnicodeToMultiByteN( pszType, cchType - 1, (PULONG)&len, tmpbuf, strlenW(tmpbuf) * sizeof(WCHAR) ); + pszType[len] = 0; + return len; } /* 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] Tue Mar 29 05:53:34 2011 @@ -1764,15 +1764,8 @@ INT NTAPI NtUserGetClassName(HWND hWnd, - PUNICODE_STRING ClassName, - BOOL Ansi); -#if 0 // Real NtUserGetClassName -INT -NTAPI -NtUserGetClassName(HWND hWnd, BOOL Real, // 0 GetClassNameW, 1 RealGetWindowClassA/W PUNICODE_STRING ClassName); -#endif HANDLE NTAPI 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] Tue Mar 29 05:53:34 2011 @@ -1398,6 +1398,7 @@ INT UserGetClassName(IN PCLS Class, IN OUT PUNICODE_STRING ClassName, + IN RTL_ATOM Atom, IN BOOL Ansi) { NTSTATUS Status = STATUS_SUCCESS; @@ -1451,7 +1452,7 @@ /* query the class name */ Status = RtlQueryAtomInAtomTable(gAtomTable, - Class->atomClassName, + Atom ? Atom : Class->atomClassName, NULL, NULL, szTemp, @@ -1485,7 +1486,7 @@ /* query the atom name */ Status = RtlQueryAtomInAtomTable(gAtomTable, - Class->atomClassName, + Atom ? Atom : Class->atomClassName, NULL, NULL, ClassName->Buffer, @@ -2376,18 +2377,27 @@ INT APIENTRY NtUserGetClassName (IN HWND hWnd, - OUT PUNICODE_STRING ClassName, - IN BOOL Ansi) + IN BOOL Real, + OUT PUNICODE_STRING ClassName) { PWND Window; UNICODE_STRING CapturedClassName; - INT Ret = 0; + INT iCls, Ret = 0; + RTL_ATOM Atom = 0; UserEnterShared(); Window = UserGetWindowObject(hWnd); if (Window != NULL) { + if (Real && Window->fnid && !(Window->fnid & FNID_DESTROY)) + { + if (LookupFnIdToiCls(Window->fnid, &iCls)) + { + Atom = gpsi->atomSysClass[iCls]; + } + } + _SEH2_TRY { ProbeForWriteUnicodeString(ClassName); @@ -2396,7 +2406,8 @@ /* get the class name */ Ret = UserGetClassName(Window->pcls, &CapturedClassName, - Ansi); + Atom, + FALSE); if (Ret != 0) {
13 years, 9 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
28
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
Results per page:
10
25
50
100
200