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
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
April 2010
----- 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
22 participants
435 discussions
Start a n
N
ew thread
[gschneider] 46907: [SHELL32] - Simplify checks for success of ShellExecuteEx, field hInst may be an unreliable indicator according to http://msdn.microsoft.com/en-us/library/bb759784%28v=VS.85%29.aspx - Fixes folder options control panel opening twice See issue #4910 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Sat Apr 17 22:02:12 2010 New Revision: 46907 URL:
http://svn.reactos.org/svn/reactos?rev=46907&view=rev
Log: [SHELL32] - Simplify checks for success of ShellExecuteEx, field hInst may be an unreliable indicator according to
http://msdn.microsoft.com/en-us/library/bb759784%28v=VS.85%29.aspx
- Fixes folder options control panel opening twice See issue #4910 for more details. Modified: trunk/reactos/dll/win32/shell32/shfldr_cpanel.c trunk/reactos/dll/win32/shell32/shfldr_fonts.c Modified: trunk/reactos/dll/win32/shell32/shfldr_cpanel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_c…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] Sat Apr 17 22:02:12 2010 @@ -1298,8 +1298,8 @@ sei.hwnd = lpcmi->hwnd; sei.nShow = SW_SHOWNORMAL; sei.lpVerb = L"open"; - ShellExecuteExW(&sei); - if (sei.hInstApp <= (HINSTANCE)32) + + if (ShellExecuteExW(&sei) == FALSE) return E_FAIL; } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_CREATELINK)) //FIXME Modified: trunk/reactos/dll/win32/shell32/shfldr_fonts.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_f…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_fonts.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_fonts.c [iso-8859-1] Sat Apr 17 22:02:12 2010 @@ -979,8 +979,7 @@ pfont = _ILGetFontStruct(This->apidl); sei.lpFile = pfont->szName + pfont->offsFile; - ShellExecuteExW(&sei); - if (sei.hInstApp <= (HINSTANCE)32) + if (ShellExecuteExW(&sei) == FALSE) return E_FAIL; } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(4))
14 years, 6 months
1
0
0
0
[jgardou] 46906: [WIN32K] - For now, limit DC_UnlockDc to a simple GDIOBJ_LockObj - More GDIOBJ_LockMultipleObj, DC_vPrepareDCsForBlit and DC_vFinishBlit fun
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Apr 17 17:24:10 2010 New Revision: 46906 URL:
http://svn.reactos.org/svn/reactos?rev=46906&view=rev
Log: [WIN32K] - For now, limit DC_UnlockDc to a simple GDIOBJ_LockObj - More GDIOBJ_LockMultipleObj, DC_vPrepareDCsForBlit and DC_vFinishBlit fun Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] Sat Apr 17 17:24:10 2010 @@ -592,11 +592,7 @@ { SURFACE_LockBitmapBits(psurfSrc); } - MouseSafetyOnDrawStart(psoSrc, rclSrc.left, rclSrc.top, - rclSrc.right, rclSrc.bottom); - } - MouseSafetyOnDrawStart(psoTrg, rclClipped.left, rclClipped.top, - rclClipped.right, rclClipped.bottom); + } } /* Is the target surface device managed? */ @@ -638,16 +634,13 @@ if (bRemoveMouse) { - MouseSafetyOnDrawEnd(psoTrg); if (psoSrc) { - MouseSafetyOnDrawEnd(psoSrc); if (psoSrc != psoTrg) { SURFACE_UnlockBitmapBits(psurfSrc); } } - SURFACE_UnlockBitmapBits(psurfTrg); } Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] Sat Apr 17 17:24:10 2010 @@ -152,12 +152,12 @@ /* Internal functions *********************************************************/ -#if 0 +#if 1 #define DC_LockDc(hDC) \ ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC)) #define DC_UnlockDc(pDC) \ GDIOBJ_UnlockObjByPtr ((POBJ)pDC) -#endif +#else VOID NTAPI EngAcquireSemaphoreShared(IN HSEMAPHORE hsem); @@ -196,6 +196,7 @@ GDIOBJ_UnlockObjByPtr(&pdc->BaseObject); } +#endif extern PDC defaultDCstate; Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Sat Apr 17 17:24:10 2010 @@ -171,52 +171,60 @@ { PDC DCDest; PDC DCSrc = NULL; + HDC ahDC[2]; + PGDIOBJ apObj[2]; PDC_ATTR pdcattr = NULL; SURFACE *BitmapDest, *BitmapSrc = NULL; - RECTL DestRect; + RECTL DestRect, SourceRect; POINTL SourcePoint; BOOL Status = FALSE; EXLATEOBJ exlo; XLATEOBJ *XlateObj = NULL; BOOL UsesSource = ROP3_USES_SOURCE(ROP); - DCDest = DC_LockDc(hDCDest); + DPRINT("Locking DCs\n"); + ahDC[0] = hDCDest; + ahDC[1] = hDCSrc ; + GDIOBJ_LockMultipleObjs(2, ahDC, apObj); + DCDest = apObj[0]; + DCSrc = apObj[1]; + if (NULL == DCDest) { + if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest); return FALSE; } if (DCDest->dctype == DC_TYPE_INFO) { - DC_UnlockDc(DCDest); + if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); /* Yes, Windows really returns TRUE in this case */ return TRUE; } if (UsesSource) { - if (hDCSrc != hDCDest) + if (NULL == DCSrc) { - DCSrc = DC_LockDc(hDCSrc); - if (NULL == DCSrc) - { - DC_UnlockDc(DCDest); - DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc); - return FALSE; - } - if (DCSrc->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(DCSrc); - DC_UnlockDc(DCDest); - /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); + DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc); + return FALSE; } - else + if (DCSrc->dctype == DC_TYPE_INFO) { - DCSrc = DCDest; + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + /* Yes, Windows really returns TRUE in this case */ + return TRUE; } + } + else if(DCSrc) + { + DPRINT1("Getting a valid Source handle without using source!!!"); + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + DCSrc = NULL ; } pdcattr = DCDest->pdcattr; @@ -244,7 +252,15 @@ SourcePoint.x += DCSrc->ptlDCOrig.x; SourcePoint.y += DCSrc->ptlDCOrig.y; - } + /* Calculate Source Rect */ + SourceRect.left = SourcePoint.x; + SourceRect.top = SourcePoint.y; + SourceRect.right = SourcePoint.x + DestRect.right - DestRect.left; + SourceRect.bottom = SourcePoint.y + DestRect.bottom - DestRect.top ; + } + + /* Prepare blit */ + DC_vPrepareDCsForBlit(DCDest, DestRect, DCSrc, SourceRect); /* Determine surfaces to be used in the bitblt */ BitmapDest = DCDest->dclevel.pSurface; @@ -280,14 +296,15 @@ &DCDest->dclevel.pbrFill->ptOrigin, ROP3_TO_ROP4(ROP)); -cleanup: if (UsesSource) EXLATEOBJ_vCleanup(&exlo); - if (UsesSource && hDCSrc != hDCDest) - { - DC_UnlockDc(DCSrc); - } - DC_UnlockDc(DCDest); +cleanup: + DC_vFinishBlit(DCDest, DCSrc); + if (UsesSource) + { + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + } + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); return Status; } @@ -958,6 +975,8 @@ EBRUSHOBJ_vInit(&eboFill, pbrush, pdc); + DC_vPrepareDCsForBlit(pdc, DestRect, NULL, DestRect); + ret = IntEngBitBlt( &psurf->SurfObj, NULL, @@ -972,6 +991,8 @@ ROP3_TO_ROP4(dwRop)); EBRUSHOBJ_vCleanup(&eboFill); + + DC_vFinishBlit(pdc, NULL); return ret; } Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Sat Apr 17 17:24:10 2010 @@ -115,11 +115,13 @@ DCTYPE dctype, PPDEVOBJ ppdev) { +#if 0 if (dctype == DCTYPE_DIRECT) { /* Lock ppdev */ EngAcquireSemaphoreShared(ppdev->hsemDevLock); } +#endif /* Setup some basic fields */ pdc->dctype = dctype;
14 years, 6 months
1
0
0
0
[jgardou] 46905: [WIN32K] -Use GDIOBJ_LockMultipleObjs, DC_vPrepareDCsForBlit and DC_vFinishBlit in NtGdiTransparentBlt -Get rid of MouseSafetyOnDraw{End, Start} in IntEngTransparentBlt
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Apr 17 16:46:05 2010 New Revision: 46905 URL:
http://svn.reactos.org/svn/reactos?rev=46905&view=rev
Log: [WIN32K] -Use GDIOBJ_LockMultipleObjs, DC_vPrepareDCsForBlit and DC_vFinishBlit in NtGdiTransparentBlt -Get rid of MouseSafetyOnDraw{End,Start} in IntEngTransparentBlt Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/transblt.c branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/transblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/eng/transblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/eng/transblt.c [iso-8859-1] Sat Apr 17 16:46:05 2010 @@ -76,7 +76,7 @@ OutputRect.top = DestRect->bottom; OutputRect.bottom = DestRect->top; } - + if(Clip) { if(OutputRect.left < Clip->rclBounds.left) @@ -287,12 +287,8 @@ if(psoSource != psoDest) { SURFACE_LockBitmapBits(psurfSource); - MouseSafetyOnDrawStart(psoSource, InputRect.left, InputRect.top, - InputRect.right, InputRect.bottom); } SURFACE_LockBitmapBits(psurfDest); - MouseSafetyOnDrawStart(psoDest, OutputRect.left, OutputRect.top, - OutputRect.right, OutputRect.bottom); if(psurfDest->flHooks & HOOK_TRANSPARENTBLT) { @@ -309,11 +305,9 @@ &OutputRect, &InputRect, iTransColor, Reserved); } - MouseSafetyOnDrawEnd(psoDest); SURFACE_UnlockBitmapBits(psurfDest); if(psoSource != psoDest) { - MouseSafetyOnDrawEnd(psoSource); SURFACE_UnlockBitmapBits(psurfSource); } Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Sat Apr 17 16:46:05 2010 @@ -307,6 +307,8 @@ COLORREF TransColor) { PDC DCDest, DCSrc; + HDC ahDC[2]; + PGDIOBJ apObj[2]; RECTL rcDest, rcSrc; SURFACE *BitmapDest, *BitmapSrc = NULL; HPALETTE SourcePalette = 0, DestPalette = 0; @@ -316,42 +318,54 @@ BOOL Ret = FALSE; EXLATEOBJ exlo; - if(!(DCDest = DC_LockDc(hdcDst))) - { - DPRINT1("Invalid destination dc handle (0x%08x) passed to NtGdiTransparentBlt\n", hdcDst); + DPRINT("Locking DCs\n"); + ahDC[0] = hdcDst; + ahDC[1] = hdcSrc ; + GDIOBJ_LockMultipleObjs(2, ahDC, apObj); + DCDest = apObj[0]; + DCSrc = apObj[1]; + + if ((NULL == DCDest) || (NULL == DCSrc)) + { + DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hdcDst, hdcSrc); SetLastWin32Error(ERROR_INVALID_HANDLE); + if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); return FALSE; } - if (DCDest->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(DCDest); + + if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO) + { + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); /* Yes, Windows really returns TRUE in this case */ return TRUE; } - if((hdcDst != hdcSrc) && !(DCSrc = DC_LockDc(hdcSrc))) - { - DC_UnlockDc(DCDest); - DPRINT1("Invalid source dc handle (0x%08x) passed to NtGdiTransparentBlt\n", hdcSrc); - SetLastWin32Error(ERROR_INVALID_HANDLE); - return FALSE; - } - - if(hdcDst == hdcSrc) - { - DCSrc = DCDest; - } - - if (DCSrc->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(DCSrc); - if(hdcDst != hdcSrc) - { - DC_UnlockDc(DCDest); - } - /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } + rcDest.left = xDst; + rcDest.top = yDst; + rcDest.right = rcDest.left + cxDst; + rcDest.bottom = rcDest.top + cyDst; + IntLPtoDP(DCDest, (LPPOINT)&rcDest, 2); + + rcDest.left += DCDest->ptlDCOrig.x; + rcDest.top += DCDest->ptlDCOrig.y; + rcDest.right += DCDest->ptlDCOrig.x; + rcDest.bottom += DCDest->ptlDCOrig.y; + + rcSrc.left = xSrc; + rcSrc.top = ySrc; + rcSrc.right = rcSrc.left + cxSrc; + rcSrc.bottom = rcSrc.top + cySrc; + IntLPtoDP(DCSrc, (LPPOINT)&rcSrc, 2); + + rcSrc.left += DCSrc->ptlDCOrig.x; + rcSrc.top += DCSrc->ptlDCOrig.y; + rcSrc.right += DCSrc->ptlDCOrig.x; + rcSrc.bottom += DCSrc->ptlDCOrig.y; + + /* Prepare for blit */ + DC_vPrepareDCsForBlit(DCDest, rcDest, DCSrc, rcSrc); BitmapDest = DCDest->dclevel.pSurface; if (!BitmapDest) @@ -402,39 +416,17 @@ EXLATEOBJ_vInitialize(&exlo, PalSourceGDI, PalDestGDI, 0, 0, 0); - rcDest.left = xDst; - rcDest.top = yDst; - rcDest.right = rcDest.left + cxDst; - rcDest.bottom = rcDest.top + cyDst; - IntLPtoDP(DCDest, (LPPOINT)&rcDest, 2); - - rcDest.left += DCDest->ptlDCOrig.x; - rcDest.top += DCDest->ptlDCOrig.y; - rcDest.right += DCDest->ptlDCOrig.x; - rcDest.bottom += DCDest->ptlDCOrig.y; - - rcSrc.left = xSrc; - rcSrc.top = ySrc; - rcSrc.right = rcSrc.left + cxSrc; - rcSrc.bottom = rcSrc.top + cySrc; - IntLPtoDP(DCSrc, (LPPOINT)&rcSrc, 2); - - rcSrc.left += DCSrc->ptlDCOrig.x; - rcSrc.top += DCSrc->ptlDCOrig.y; - rcSrc.right += DCSrc->ptlDCOrig.x; - rcSrc.bottom += DCSrc->ptlDCOrig.y; - Ret = IntEngTransparentBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, DCDest->rosdc.CombinedClip, &exlo.xlo, &rcDest, &rcSrc, TransparentColor, 0); + EXLATEOBJ_vCleanup(&exlo); + done: - DC_UnlockDc(DCSrc); - if(hdcDst != hdcSrc) - { - DC_UnlockDc(DCDest); - } - EXLATEOBJ_vCleanup(&exlo); + DC_vFinishBlit(DCDest, DCSrc); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + return Ret; }
14 years, 6 months
1
0
0
0
[sir_richard] 46904: [NTOS]: 1MB is not 1000 * 1KB...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Sat Apr 17 16:28:15 2010 New Revision: 46904 URL:
http://svn.reactos.org/svn/reactos?rev=46904&view=rev
Log: [NTOS]: 1MB is not 1000 * 1KB... Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sat Apr 17 16:28:15 2010 @@ -40,7 +40,7 @@ /* Make the code cleaner with some definitions for size multiples */ #define _1KB (1024) -#define _1MB (1000 * _1KB) +#define _1MB (1024 * _1KB) /* Size of a PDE directory, and size of a page table */ #define PDE_SIZE (PDE_COUNT * sizeof(MMPDE)) @@ -126,6 +126,12 @@ // // END FIXFIX // + +typedef struct _MI_LARGE_PAGE_DRIVER_ENTRY +{ + LIST_ENTRY Links; + UNICODE_STRING BaseName; +} MI_LARGE_PAGE_DRIVER_ENTRY, *PMI_LARGE_PAGE_DRIVER_ENTRY; typedef enum _MMSYSTEM_PTE_POOL_TYPE { @@ -235,6 +241,9 @@ extern PFN_NUMBER MiHighNonPagedPoolThreshold; extern PFN_NUMBER MmMinimumFreePages; extern PFN_NUMBER MmPlentyFreePages; +extern PFN_NUMBER MiExpansionPoolPagesInitialCharge; +extern PFN_NUMBER MmResidentAvailablePages; +extern PFN_NUMBER MmResidentAvailablePagesAtInit; #define MI_PFN_TO_PFNENTRY(x) (&MmPfnDatabase[1][x]) #define MI_PFNENTRY_TO_PFN(x) (x - MmPfnDatabase[1])
14 years, 6 months
1
0
0
0
[jgardou] 46903: Fix typo...
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Apr 17 16:24:50 2010 New Revision: 46903 URL:
http://svn.reactos.org/svn/reactos?rev=46903&view=rev
Log: Fix typo... Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Sat Apr 17 16:24:50 2010 @@ -78,8 +78,7 @@ GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); /* Yes, Windows really returns TRUE in this case */ - bResult = TRUE; - goto leave; + return TRUE; } DestRect.left = XOriginDest;
14 years, 6 months
1
0
0
0
[jgardou] 46902: [WIN32K] - Introduce DC_vPrepareDCsForBlit and DC_vFinishBlit and use them in NtGdiAlphaBlend - Get rid of now unnecessary call for MouseSafetyOnDraw{Start, End} in IntEngAlphaBlend - Yet Another Rewrite of GDIOBJ_LockMultipleObjs :-/ and use it in NtGdiAlphaBlend
by jgardou@svn.reactos.org
Author: jgardou Date: Sat Apr 17 16:20:48 2010 New Revision: 46902 URL:
http://svn.reactos.org/svn/reactos?rev=46902&view=rev
Log: [WIN32K] - Introduce DC_vPrepareDCsForBlit and DC_vFinishBlit and use them in NtGdiAlphaBlend - Get rid of now unnecessary call for MouseSafetyOnDraw{Start,End} in IntEngAlphaBlend - Yet Another Rewrite of GDIOBJ_LockMultipleObjs :-/ and use it in NtGdiAlphaBlend Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/alphablend.c branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h branches/reactos-yarotows/subsystems/win32/win32k/include/gdiobj.h branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/alphablend.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/eng/alphablend.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/eng/alphablend.c [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -1,4 +1,4 @@ -/* +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: GDI alpha blending functions @@ -71,7 +71,7 @@ InputRect = *SourceRect; if ( (InputRect.top < 0) || (InputRect.bottom < 0) || (InputRect.left < 0) || (InputRect.right < 0) || - InputRect.right > psoSource->sizlBitmap.cx || + InputRect.right > psoSource->sizlBitmap.cx || InputRect.bottom > psoSource->sizlBitmap.cy ) { SetLastWin32Error(ERROR_INVALID_PARAMETER); @@ -306,13 +306,9 @@ } SURFACE_LockBitmapBits(psurfDest); - MouseSafetyOnDrawStart(psoDest, DestRect->left, DestRect->top, - DestRect->right, DestRect->bottom); if (psoSource != psoDest) SURFACE_LockBitmapBits(psurfSource); - MouseSafetyOnDrawStart(psoSource, SourceRect->left, SourceRect->top, - SourceRect->right, SourceRect->bottom); /* Call the driver's DrvAlphaBlend if available */ if (psurfDest->flHooks & HOOK_ALPHABLEND) @@ -328,10 +324,8 @@ DestRect, SourceRect, BlendObj); } - MouseSafetyOnDrawEnd(psoSource); if (psoSource != psoDest) SURFACE_UnlockBitmapBits(psurfSource); - MouseSafetyOnDrawEnd(psoDest); SURFACE_UnlockBitmapBits(psurfDest); return ret; Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -220,6 +220,8 @@ VOID FASTCALL DC_vUpdateLineBrush(PDC pdc); VOID FASTCALL DC_vUpdateTextBrush(PDC pdc); VOID FASTCALL DC_vUpdateBackgroundBrush(PDC pdc); +VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2); +VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdc1, RECT rc1, PDC pdc2, RECT rc2); VOID NTAPI DC_vRestoreDC(IN PDC pdc, INT iSaveLevel); Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/gdiobj.h URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -34,7 +34,6 @@ typedef PVOID PGDIOBJ; typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody); -typedef VOID (INTERNAL_CALL *GDILOCKOBJPROC)(PVOID ObjectBody); /* Every GDI Object must have this standard type of header. * It's for thread locking. */ @@ -72,7 +71,7 @@ BOOL INTERNAL_CALL GDIOBJ_FreeObjByHandle (HGDIOBJ hObj, DWORD ObjectType); PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType); PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType); -VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj); +VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj); PVOID INTERNAL_CALL GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process); Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -42,6 +42,8 @@ { PDC DCDest; PDC DCSrc; + HDC ahDC[2]; + PGDIOBJ apObj[2]; SURFACE *BitmapDest, *BitmapSrc; RECTL DestRect, SourceRect; BOOL bResult; @@ -55,43 +57,29 @@ return FALSE; } - DCDest = DC_LockDc(hDCDest); - if (NULL == DCDest) - { - DPRINT1("Invalid destination dc handle (0x%08x) passed to NtGdiAlphaBlend\n", hDCDest); + DPRINT("Locking DCs\n"); + ahDC[0] = hDCDest; + ahDC[1] = hDCSrc ; + GDIOBJ_LockMultipleObjs(2, ahDC, apObj); + DCDest = apObj[0]; + DCSrc = apObj[1]; + + if ((NULL == DCDest) || (NULL == DCSrc)) + { + DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hDCDest, hDCSrc); SetLastWin32Error(ERROR_INVALID_HANDLE); + if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); return FALSE; } - if (DCDest->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(DCDest); + if (DCDest->dctype == DC_TYPE_INFO || DCDest->dctype == DCTYPE_INFO) + { + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } - - if (hDCSrc != hDCDest) - { - DCSrc = DC_LockDc(hDCSrc); - if (NULL == DCSrc) - { - DC_UnlockDc(DCDest); - DPRINT1("Invalid source dc handle (0x%08x) passed to NtGdiAlphaBlend\n", hDCSrc); - SetLastWin32Error(ERROR_INVALID_HANDLE); - return FALSE; - } - - if (DCSrc->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(DCSrc); - DC_UnlockDc(DCDest); - /* Yes, Windows really returns TRUE in this case */ - return TRUE; - } - } - else - { - DCSrc = DCDest; + bResult = TRUE; + goto leave; } DestRect.left = XOriginDest; @@ -121,35 +109,35 @@ !SourceRect.right || !SourceRect.bottom) { - if (hDCSrc != hDCDest) - DC_UnlockDc(DCSrc); - DC_UnlockDc(DCDest); + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); return TRUE; } + + /* Prepare DCs for blit */ + DPRINT("Preparing DCs for blit\n"); + DC_vPrepareDCsForBlit(DCDest, DestRect, DCSrc, SourceRect); /* Determine surfaces to be used in the bitblt */ BitmapDest = DCDest->dclevel.pSurface; if (!BitmapDest) { - if (hDCSrc != hDCDest) - DC_UnlockDc(DCSrc); - DC_UnlockDc(DCDest); - return FALSE; + bResult = FALSE ; + goto leave ; } BitmapSrc = DCSrc->dclevel.pSurface; if (!BitmapSrc) { - if (hDCSrc != hDCDest) - DC_UnlockDc(DCSrc); - DC_UnlockDc(DCDest); - return FALSE; + bResult = FALSE; + goto leave; } /* Create the XLATEOBJ. */ EXLATEOBJ_vInitXlateFromDCs(&exlo, DCSrc, DCDest); /* Perform the alpha blend operation */ + DPRINT("Performing the alpha Blend\n"); bResult = IntEngAlphaBlend(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, DCDest->rosdc.CombinedClip, @@ -159,9 +147,11 @@ &BlendObj); EXLATEOBJ_vCleanup(&exlo); - DC_UnlockDc(DCDest); - if (hDCSrc != hDCDest) - DC_UnlockDc(DCSrc); +leave : + DPRINT("Finishing blit\n"); + DC_vFinishBlit(DCDest, DCSrc); + GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject); + GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject); return bResult; } @@ -833,8 +823,8 @@ (BitmapMask->SurfObj.sizlBitmap.cx < WidthSrc || BitmapMask->SurfObj.sizlBitmap.cy < HeightSrc)) { - DPRINT1("%dx%d mask is smaller than %dx%d bitmap\n", - BitmapMask->SurfObj.sizlBitmap.cx, BitmapMask->SurfObj.sizlBitmap.cy, + DPRINT1("%dx%d mask is smaller than %dx%d bitmap\n", + BitmapMask->SurfObj.sizlBitmap.cx, BitmapMask->SurfObj.sizlBitmap.cy, WidthSrc, HeightSrc); goto failed; } Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -451,6 +451,49 @@ return ret; } +/* Prepare a blit for up to 2 DCs */ +/* rc1 and rc2 are the rectangles where we want to draw or + * from where we take pixels. */ +VOID +FASTCALL +DC_vPrepareDCsForBlit(PDC pdc1, + RECT rc1, + PDC pdc2, + RECT rc2) +{ + if(pdc1->dctype == DCTYPE_DIRECT) + { + EngAcquireSemaphore(pdc1->ppdev->hsemDevLock); + MouseSafetyOnDrawStart(&pdc1->dclevel.pSurface->SurfObj, rc1.left, rc1.top, rc1.right, rc1.bottom) ; + } + if(pdc2 && pdc2->dctype == DCTYPE_DIRECT) + { + EngAcquireSemaphore(pdc2->ppdev->hsemDevLock); + MouseSafetyOnDrawStart(&pdc2->dclevel.pSurface->SurfObj, rc2.left, rc2.top, rc2.right, rc2.bottom) ; + } +} + +/* Finishes a blit for one or two DCs */ +VOID +FASTCALL +DC_vFinishBlit(PDC pdc1, PDC pdc2) +{ + if(pdc1->dctype == DCTYPE_DIRECT) + { + MouseSafetyOnDrawEnd(&pdc1->dclevel.pSurface->SurfObj); + EngReleaseSemaphore(pdc1->ppdev->hsemDevLock); + } + + if(pdc2) + { + if(pdc2->dctype == DCTYPE_DIRECT) + { + MouseSafetyOnDrawEnd(&pdc2->dclevel.pSurface->SurfObj); + EngReleaseSemaphore(pdc2->ppdev->hsemDevLock); + } + } +} + HDC NTAPI GreOpenDCW( Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Sat Apr 17 16:20:48 2010 @@ -1625,39 +1625,35 @@ return MappedView; } -/* Locks up to 3 objects at a time */ +/* Locks 2 or 3 objects at a time */ VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj) { - UINT iFirst = 0, iSecond = 0, iThird = 0; - UINT i ; + UINT auiIndices[3] = {0,1,2}; + UINT i, tmp ; + BOOL bUnsorted = TRUE; /* First is greatest */ - for(i=1; i<ulCount; i++) - { - if((ULONG_PTR)ahObj[i] >= (ULONG_PTR)ahObj[iFirst]) - { - iSecond = iFirst ; - iFirst = i; - continue ; - } - if((ULONG_PTR)ahObj[i] >= (ULONG_PTR)ahObj[iSecond]) - { - iSecond = i; - continue; - } - iThird = i; - } - - /* We consider that at least two handles were passed */ - apObj[iFirst] = GDIOBJ_LockObj(ahObj[iFirst], GDI_OBJECT_TYPE_DONTCARE); - apObj[iSecond] = GDIOBJ_LockObj(ahObj[iSecond], GDI_OBJECT_TYPE_DONTCARE); - if(ulCount == 3) - apObj[iThird] = GDIOBJ_LockObj(ahObj[iThird], GDI_OBJECT_TYPE_DONTCARE); - + while(bUnsorted) + { + bUnsorted = FALSE; + for(i=1; i<ulCount; i++) + { + if((ULONG_PTR)ahObj[auiIndices[i-1]] < (ULONG_PTR)ahObj[auiIndices[i]]) + { + tmp = auiIndices[i-1]; + auiIndices[i-1] = auiIndices[i]; + auiIndices[i] = tmp; + bUnsorted = TRUE; + } + } + } + + for(i=0;i<ulCount;i++) + apObj[auiIndices[i]] = GDIOBJ_LockObj(ahObj[auiIndices[i]], GDI_OBJECT_TYPE_DONTCARE); }
14 years, 6 months
1
0
0
0
[akhaldi] 46901: [DDK] - Move ntddchgr.h and ntddstor.h to PSDK, apply a consistent formatting, group related definitions, add some missing definitions and improve several existing ones. - scsi.h : Add missing srb.h inclusion, group related definitions, apply a consistent formatting, add several missing definitions and improve a couple of existing ones. - srb.h : Group related definitions, apply a consistent formatting, add several missing definitions and improve some existing ones.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Apr 16 23:43:38 2010 New Revision: 46901 URL:
http://svn.reactos.org/svn/reactos?rev=46901&view=rev
Log: [DDK] - Move ntddchgr.h and ntddstor.h to PSDK, apply a consistent formatting, group related definitions, add some missing definitions and improve several existing ones. - scsi.h : Add missing srb.h inclusion, group related definitions, apply a consistent formatting, add several missing definitions and improve a couple of existing ones. - srb.h : Group related definitions, apply a consistent formatting, add several missing definitions and improve some existing ones. Added: branches/header-work/include/psdk/ntddchgr.h - copied, changed from r46874, branches/header-work/include/ddk/ntddchgr.h branches/header-work/include/psdk/ntddstor.h - copied, changed from r46874, branches/header-work/include/ddk/ntddstor.h Removed: branches/header-work/include/ddk/ntddchgr.h branches/header-work/include/ddk/ntddstor.h Modified: branches/header-work/include/ddk/scsi.h branches/header-work/include/ddk/srb.h [This mail would be too long, it was shortened to contain the URLs only.] Removed: branches/header-work/include/ddk/ntddchgr.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddchg…
Removed: branches/header-work/include/ddk/ntddstor.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddsto…
Modified: branches/header-work/include/ddk/scsi.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/scsi.h?…
Modified: branches/header-work/include/ddk/srb.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/srb.h?r…
Copied: branches/header-work/include/psdk/ntddchgr.h (from r46874, branches/header-work/include/ddk/ntddchgr.h) URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ntddch…
Copied: branches/header-work/include/psdk/ntddstor.h (from r46874, branches/header-work/include/ddk/ntddstor.h) URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ntddst…
14 years, 6 months
1
0
0
0
[gschneider] 46900: [SHELL32] - Add support for deleting multiple files from the context menu - Fix error debug print See issue #4383 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Fri Apr 16 23:22:06 2010 New Revision: 46900 URL:
http://svn.reactos.org/svn/reactos?rev=46900&view=rev
Log: [SHELL32] - Add support for deleting multiple files from the context menu - Fix error debug print See issue #4383 for more details. Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Fri Apr 16 23:22:06 2010 @@ -48,7 +48,7 @@ } VOID INewItem_SetCurrentShellFolder(IShellFolder * psfParent); // HACK - +WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); static HRESULT @@ -1297,12 +1297,12 @@ HRESULT hr; STRRET strTemp; WCHAR szPath[MAX_PATH]; + LPWSTR wszPath, wszPos; SHFILEOPSTRUCTW op; int ret; LPSHELLBROWSER lpSB; HWND hwnd; - hr = IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strTemp); if(hr != S_OK) { @@ -1316,20 +1316,26 @@ ERR("StrRetToBufW failed with %x\n", hr); return hr; } - /* FIXME - * implement deletion with multiple files - */ + + /* Only keep the base path */ + wszPos = strrchrW(szPath, '\\'); + if (wszPos != NULL) + { + *(wszPos + 1) = '\0'; + } + + wszPath = build_paths_list(szPath, This->dcm.cidl, This->dcm.apidl); ZeroMemory(&op, sizeof(op)); op.hwnd = GetActiveWindow(); op.wFunc = FO_DELETE; - op.pFrom = szPath; + op.pFrom = wszPath; op.fFlags = FOF_ALLOWUNDO; ret = SHFileOperationW(&op); if (ret) { - TRACE("SHFileOperation failed with %0x%x", GetLastError()); + ERR("SHFileOperation failed with 0x%x for %s\n", GetLastError(), debugstr_w(wszPath)); return S_OK; } @@ -1348,6 +1354,7 @@ } NotifyShellViewWindow(lpcmi, TRUE); + HeapFree(GetProcessHeap(), 0, wszPath); return S_OK; }
14 years, 6 months
1
0
0
0
[jgardou] 46899: [WIN32K] - There is currently no need to lock more than three objects at a time, this permits code simplification/speed - Keep the handles order in GDIOBJ_LockMultipleObjs Still unused...
by jgardou@svn.reactos.org
Author: jgardou Date: Fri Apr 16 18:55:52 2010 New Revision: 46899 URL:
http://svn.reactos.org/svn/reactos?rev=46899&view=rev
Log: [WIN32K] - There is currently no need to lock more than three objects at a time, this permits code simplification/speed - Keep the handles order in GDIOBJ_LockMultipleObjs Still unused... Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Fri Apr 16 18:55:52 2010 @@ -1625,37 +1625,39 @@ return MappedView; } -/* Locks multiple objects at a time */ +/* Locks up to 3 objects at a time */ VOID INTERNAL_CALL GDIOBJ_LockMultipleObjs(ULONG ulCount, IN HGDIOBJ* ahObj, OUT PGDIOBJ* apObj) { - UINT i; - HGDIOBJ hTmp ; - BOOL unsorted = TRUE; - /* We bubble-sort them */ - while(unsorted) - { - unsorted = FALSE ; - for(i=0; i<ulCount - 1; i++) - { - /* The greatest the first */ - if((ULONG_PTR)ahObj[i] < (ULONG_PTR)ahObj[i+1]) - { - hTmp = ahObj[i]; - ahObj[i]=ahObj[i+1]; - ahObj[i+1] = hTmp; - unsorted = TRUE ; - } - } - } - /* Then we lock them */ - for(i=0; i<ulCount; i++) - { - apObj[i]=GDIOBJ_LockObj(ahObj[i], GDI_OBJECT_TYPE_DONTCARE); - } + UINT iFirst = 0, iSecond = 0, iThird = 0; + UINT i ; + + /* First is greatest */ + for(i=1; i<ulCount; i++) + { + if((ULONG_PTR)ahObj[i] >= (ULONG_PTR)ahObj[iFirst]) + { + iSecond = iFirst ; + iFirst = i; + continue ; + } + if((ULONG_PTR)ahObj[i] >= (ULONG_PTR)ahObj[iSecond]) + { + iSecond = i; + continue; + } + iThird = i; + } + + /* We consider that at least two handles were passed */ + apObj[iFirst] = GDIOBJ_LockObj(ahObj[iFirst], GDI_OBJECT_TYPE_DONTCARE); + apObj[iSecond] = GDIOBJ_LockObj(ahObj[iSecond], GDI_OBJECT_TYPE_DONTCARE); + if(ulCount == 3) + apObj[iThird] = GDIOBJ_LockObj(ahObj[iThird], GDI_OBJECT_TYPE_DONTCARE); + }
14 years, 6 months
1
0
0
0
[gschneider] 46898: [PING] - Skip the last unnecessary wait in a series of pings - Patch by Rafal Harabien, <rafalh1992 AT o2 DOT pl> See issue #5300 for more details.
by gschneider@svn.reactos.org
Author: gschneider Date: Fri Apr 16 16:47:46 2010 New Revision: 46898 URL:
http://svn.reactos.org/svn/reactos?rev=46898&view=rev
Log: [PING] - Skip the last unnecessary wait in a series of pings - Patch by Rafal Harabien, <rafalh1992 AT o2 DOT pl> See issue #5300 for more details. Modified: trunk/reactos/base/applications/network/ping/ping.c Modified: trunk/reactos/base/applications/network/ping/ping.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ping/ping.c [iso-8859-1] Fri Apr 16 16:47:46 2010 @@ -630,8 +630,9 @@ while ((NeverStop) || (Count < PingCount)) { Ping(); - Sleep(Timeout); Count++; + if((NeverStop) || (Count < PingCount)) + Sleep(Timeout); }; Cleanup();
14 years, 6 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
44
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
Results per page:
10
25
50
100
200