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
April 2010
----- 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
22 participants
435 discussions
Start a n
N
ew thread
[fireball] 46967: - Sync rsaenh, schannel, shlwapi, sti, urlmon, usp10, version, windowscodecs, wininet, wintrust to Wine-1.1.43. - Update README.WINE.
by fireball@svn.reactos.org
Author: fireball Date: Tue Apr 20 23:18:54 2010 New Revision: 46967 URL:
http://svn.reactos.org/svn/reactos?rev=46967&view=rev
Log: - Sync rsaenh, schannel, shlwapi, sti, urlmon, usp10, version, windowscodecs, wininet, wintrust to Wine-1.1.43. - Update README.WINE. Added: trunk/reactos/dll/win32/sti/sti.c (with props) trunk/reactos/dll/win32/sti/sti_private.h (with props) trunk/reactos/dll/win32/sti/sti_wia.idl (with props) trunk/reactos/dll/win32/usp10/bidi.c (with props) trunk/reactos/dll/win32/usp10/usp10_internal.h (with props) trunk/reactos/dll/win32/windowscodecs/tiffformat.c (with props) trunk/reactos/include/psdk/shdeprecated.idl (with props) trunk/reactos/include/psdk/wia.h (with props) trunk/reactos/include/psdk/wia_lh.idl (with props) trunk/reactos/include/psdk/wia_xp.idl (with props) Modified: trunk/reactos/dll/win32/lpk/dllmain.c trunk/reactos/dll/win32/rsaenh/rsaenh.c trunk/reactos/dll/win32/rsaenh/sha2.c trunk/reactos/dll/win32/schannel/lsamode.c trunk/reactos/dll/win32/shlwapi/ordinal.c trunk/reactos/dll/win32/shlwapi/shlwapi.spec trunk/reactos/dll/win32/shlwapi/url.c trunk/reactos/dll/win32/sti/regsvr.c trunk/reactos/dll/win32/sti/sti.rbuild trunk/reactos/dll/win32/sti/sti.spec trunk/reactos/dll/win32/sti/sti_main.c trunk/reactos/dll/win32/urlmon/bindprot.c trunk/reactos/dll/win32/urlmon/regsvr.c trunk/reactos/dll/win32/urlmon/urlmon_main.c trunk/reactos/dll/win32/urlmon/urlmon_main.h trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl trunk/reactos/dll/win32/urlmon/usrmarshal.c trunk/reactos/dll/win32/usp10/usp10.c trunk/reactos/dll/win32/usp10/usp10.rbuild trunk/reactos/dll/win32/usp10/usp10.spec trunk/reactos/dll/win32/version/resource.c trunk/reactos/dll/win32/windowscodecs/bmpdecode.c trunk/reactos/dll/win32/windowscodecs/clsfactory.c trunk/reactos/dll/win32/windowscodecs/converter.c trunk/reactos/dll/win32/windowscodecs/gifformat.c trunk/reactos/dll/win32/windowscodecs/icoformat.c trunk/reactos/dll/win32/windowscodecs/jpegformat.c trunk/reactos/dll/win32/windowscodecs/palette.c trunk/reactos/dll/win32/windowscodecs/pngformat.c trunk/reactos/dll/win32/windowscodecs/regsvr.c trunk/reactos/dll/win32/windowscodecs/stream.c trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h trunk/reactos/dll/win32/windowscodecs/windowscodecs.rbuild trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/dll/win32/wininet/urlcache.c trunk/reactos/dll/win32/wintrust/asn.c trunk/reactos/include/psdk/ntsecpkg.h trunk/reactos/include/psdk/psdk.rbuild trunk/reactos/include/psdk/shlwapi.h trunk/reactos/include/psdk/sti.h trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/lpk/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lpk/dllmain.c?re…
Modified: trunk/reactos/dll/win32/rsaenh/rsaenh.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/rsaenh.c?…
Modified: trunk/reactos/dll/win32/rsaenh/sha2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/sha2.c?re…
Modified: trunk/reactos/dll/win32/schannel/lsamode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/schannel/lsamode…
Modified: trunk/reactos/dll/win32/shlwapi/ordinal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/ordinal.…
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi.…
Modified: trunk/reactos/dll/win32/shlwapi/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
Modified: trunk/reactos/dll/win32/sti/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/regsvr.c?rev…
Added: trunk/reactos/dll/win32/sti/sti.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti.c?rev=46…
Modified: trunk/reactos/dll/win32/sti/sti.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti.rbuild?r…
Modified: trunk/reactos/dll/win32/sti/sti.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti.spec?rev…
Modified: trunk/reactos/dll/win32/sti/sti_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti_main.c?r…
Added: trunk/reactos/dll/win32/sti/sti_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti_private.…
Added: trunk/reactos/dll/win32/sti/sti_wia.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sti/sti_wia.idl?…
Modified: trunk/reactos/dll/win32/urlmon/bindprot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindprot.…
Modified: trunk/reactos/dll/win32/urlmon/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/regsvr.c?…
Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
Modified: trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ur…
Modified: trunk/reactos/dll/win32/urlmon/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/usrmarsha…
Added: trunk/reactos/dll/win32/usp10/bidi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/bidi.c?rev…
Modified: trunk/reactos/dll/win32/usp10/usp10.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.c?re…
Modified: trunk/reactos/dll/win32/usp10/usp10.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.rbui…
Modified: trunk/reactos/dll/win32/usp10/usp10.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.spec…
Added: trunk/reactos/dll/win32/usp10/usp10_internal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10_inte…
Modified: trunk/reactos/dll/win32/version/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/resource…
Modified: trunk/reactos/dll/win32/windowscodecs/bmpdecode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bm…
Modified: trunk/reactos/dll/win32/windowscodecs/clsfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/cl…
Modified: trunk/reactos/dll/win32/windowscodecs/converter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/co…
Modified: trunk/reactos/dll/win32/windowscodecs/gifformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/gi…
Modified: trunk/reactos/dll/win32/windowscodecs/icoformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
Modified: trunk/reactos/dll/win32/windowscodecs/jpegformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/jp…
Modified: trunk/reactos/dll/win32/windowscodecs/palette.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pa…
Modified: trunk/reactos/dll/win32/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pn…
Modified: trunk/reactos/dll/win32/windowscodecs/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/re…
Modified: trunk/reactos/dll/win32/windowscodecs/stream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/st…
Added: trunk/reactos/dll/win32/windowscodecs/tiffformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ti…
Modified: trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
Modified: trunk/reactos/dll/win32/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
Modified: trunk/reactos/dll/win32/wininet/urlcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache…
Modified: trunk/reactos/dll/win32/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/asn.c?r…
Modified: trunk/reactos/include/psdk/ntsecpkg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntsecpkg.h?re…
Modified: trunk/reactos/include/psdk/psdk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/psdk.rbuild?r…
Added: trunk/reactos/include/psdk/shdeprecated.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shdeprecated.…
Modified: trunk/reactos/include/psdk/shlwapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlwapi.h?rev…
Modified: trunk/reactos/include/psdk/sti.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/sti.h?rev=469…
Added: trunk/reactos/include/psdk/wia.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wia.h?rev=469…
Added: trunk/reactos/include/psdk/wia_lh.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wia_lh.idl?re…
Added: trunk/reactos/include/psdk/wia_xp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wia_xp.idl?re…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
14 years, 8 months
1
0
0
0
[jgardou] 46966: [WIN32K] - really update Text and BackGround brushes when asked to
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Apr 20 22:44:43 2010 New Revision: 46966 URL:
http://svn.reactos.org/svn/reactos?rev=46966&view=rev
Log: [WIN32K] - really update Text and BackGround brushes when asked to Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/dc.h branches/reactos-yarotows/subsystems/win32/win32k/objects/dcobjs.c 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] Tue Apr 20 22:44:43 2010 @@ -297,4 +297,6 @@ pdc->dclevel.ppal = ppal; } +extern PBRUSH pbrDefaultBrush ; + #endif /* not __WIN32K_DC_H */ Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dcobjs.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] Tue Apr 20 22:44:43 2010 @@ -110,6 +110,9 @@ { PDC_ATTR pdcattr = pdc->pdcattr; + if(pdcattr->ulDirty_ & DIRTY_TEXT) + EBRUSHOBJ_vUpdate(&pdc->eboText, pbrDefaultBrush, pdc); + /* Update the eboText's solid color */ EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboText, pdcattr->crForegroundClr); @@ -122,6 +125,9 @@ DC_vUpdateBackgroundBrush(PDC pdc) { PDC_ATTR pdcattr = pdc->pdcattr; + + if(pdcattr->ulDirty_ & DIRTY_BACKGROUND) + EBRUSHOBJ_vUpdate(&pdc->eboBackground, pbrDefaultBrush, pdc); /* Update the eboBackground's solid color */ EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboBackground, pdcattr->crBackgroundClr);
14 years, 8 months
1
0
0
0
[jgardou] 46965: [WIN32K] - Update brushes at the good moment in different places
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Apr 20 22:23:15 2010 New Revision: 46965 URL:
http://svn.reactos.org/svn/reactos?rev=46965&view=rev
Log: [WIN32K] - Update brushes at the good moment in different places Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/arc.c branches/reactos-yarotows/subsystems/win32/win32k/objects/drawing.c branches/reactos-yarotows/subsystems/win32/win32k/objects/fillshap.c branches/reactos-yarotows/subsystems/win32/win32k/objects/line.c branches/reactos-yarotows/subsystems/win32/win32k/objects/path.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/arc.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/arc.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/arc.c [iso-8859-1] Tue Apr 20 22:23:15 2010 @@ -219,12 +219,6 @@ pdcattr = dc->pdcattr; - if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) - DC_vUpdateFillBrush(dc); - - if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) - DC_vUpdateLineBrush(dc); - if (arctype == GdiTypeArcTo) { if (dc->dclevel.flPath & DCPATH_CLOCKWISE) @@ -331,6 +325,10 @@ worker1.l = dwSweepAngle; DC_vPrepareDCsForBlit(pDC, pDC->rosdc.CombinedClip->rclBounds, NULL, pDC->rosdc.CombinedClip->rclBounds); + if (pDC->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(pDC); + if (pDC->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) + DC_vUpdateLineBrush(pDC); Ret = IntGdiAngleArc( pDC, x, y, dwRadius, worker.f, worker1.f); DC_vFinishBlit(pDC, NULL); DC_UnlockDc( pDC ); @@ -370,6 +368,12 @@ DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, NULL, dc->rosdc.CombinedClip->rclBounds); + if (dc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(dc); + + if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) + DC_vUpdateLineBrush(dc); + Ret = IntGdiArcInternal( arctype, dc, Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/drawing.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/drawing.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/drawing.c [iso-8859-1] Tue Apr 20 22:23:15 2010 @@ -64,14 +64,14 @@ } Rect, *PRect; int FASTCALL IntFillRect(DC *dc, INT XLeft, INT YLeft, INT Width, INT Height, PBRUSH pbrush, BOOL Pen); -int FASTCALL app_fill_rect(DC *dc, Rect r, PBRUSH pbrush, BOOL Pen); +//int FASTCALL app_fill_rect(DC *dc, Rect r, PBRUSH pbrush, BOOL Pen); static POINT INTERNAL_CALL app_new_point(int x, int y) { - POINT p; + POINT p; p.x = x; p.y = y; return p; @@ -332,7 +332,7 @@ * * The draw_arc algorithm is based on draw_ellipse, but unlike * that algorithm is not symmetric in the general case, since - * an angular portion is clipped from the shape. + * an angular portion is clipped from the shape. * This clipping is performed by keeping track of two hypothetical * lines joining the centre point to the enclosing rectangle, * at the angles start_angle and end_angle, using a line-intersection @@ -376,7 +376,7 @@ rise2 = p2.y - p0.y; run2 = p2.x - p0.x; - if (r.y <= p0.y) // + if (r.y <= p0.y) // { /* in top half of arc ellipse */ @@ -599,7 +599,7 @@ * between an outer and inner ellipse, and also the draw_arc and * fill_arc operations which additionally clip drawing between * a start_angle and an end_angle. - * + * */ static int @@ -912,7 +912,7 @@ r1.height = r1.y+r1.height-r2.y; r1.y = r2.y; while (r1.height > 0) { - result &= app_fill_arc_rect(g, + result &= app_fill_arc_rect(g, rect(r1.x, r1.y, r1.width, 1), p0, p1, p2, start_angle, end_angle, pbrush, FALSE); r1.y += 1; @@ -1273,7 +1273,7 @@ pdcattr = dc->pdcattr; pbrush = BRUSH_LockBrush(pdcattr->hbrush); - if (!pbrush) + if (!pbrush) { DPRINT1("FillArc Fail\n"); SetLastWin32Error(ERROR_INTERNAL_ERROR); @@ -1285,7 +1285,7 @@ (dc->dclevel.flPath & DCPATH_CLOCKWISE) ? -Start : -End, pbrush, Chord); - BRUSH_UnlockBrush(pbrush); + BRUSH_UnlockBrush(pbrush); return ret; } @@ -1329,7 +1329,7 @@ INT XLeft, INT YLeft, INT Width, - INT Height, + INT Height, PBRUSH pbrush) { return (BOOL)app_fill_ellipse(dc, rect( XLeft, YLeft, Width, Height), pbrush); @@ -1343,7 +1343,7 @@ INT Right, INT Bottom, INT Wellipse, - INT Hellipse, + INT Hellipse, PBRUSH pbrush) { Rect r; @@ -1385,7 +1385,7 @@ 270, 360, pbrush,FALSE); app_fill_arc(dc, rect(r.x+r.width-rx-rx, r.y, rx+rx, ry+ry), - 0, 90, pbrush,FALSE); + 0, 90, pbrush,FALSE); } if (Wellipse < r.width) { @@ -1419,7 +1419,7 @@ r = rect( Left, Top, abs(Right-Left), abs(Bottom-Top)); rx = Wellipse/2; ry = Hellipse/2; - + if (Wellipse > r.width) { if (Hellipse > r.height) // > W > H @@ -1437,7 +1437,7 @@ app_draw_arc(dc, rect(r.x, r.y, Wellipse - 1, r.height - 1), 90, 270, pbrushPen, FALSE); app_draw_arc(dc, rect(Right - Wellipse, r.y, Wellipse - 1, r.height - 1), - 270, 90, pbrushPen, FALSE); + 270, 90, pbrushPen, FALSE); } else // < W < H { Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Tue Apr 20 22:23:15 2010 @@ -481,6 +481,12 @@ DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, NULL, dc->rosdc.CombinedClip->rclBounds); + if (dc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(dc); + + if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) + DC_vUpdateLineBrush(dc); + /* Perform the actual work */ switch (iFunc) { @@ -681,6 +687,12 @@ } DC_vPrepareDCsForBlit(dc, rect, NULL, rect); + if (dc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(dc); + + if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) + DC_vUpdateLineBrush(dc); + ret = IntRectangle ( dc, LeftRect, TopRect, RightRect, BottomRect ); DC_vFinishBlit(dc, NULL); DC_UnlockDc ( dc ); Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/line.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/line.c [iso-8859-1] Tue Apr 20 22:23:15 2010 @@ -113,9 +113,6 @@ } else { - if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) - DC_vUpdateLineBrush(dc); - psurf = dc->dclevel.pSurface; if (NULL == psurf) { @@ -250,6 +247,9 @@ if (PATH_IsPathOpen(dc->dclevel)) return PATH_Polyline(dc, pt, Count); + DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, + NULL, dc->rosdc.CombinedClip->rclBounds); + if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) DC_vUpdateFillBrush(dc); @@ -265,8 +265,6 @@ Points = EngAllocMem(0, Count * sizeof(POINT), TAG_COORD); if (Points != NULL) { - DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, - NULL, dc->rosdc.CombinedClip->rclBounds); psurf = dc->dclevel.pSurface; /* FIXME - psurf can be NULL!!!! Don't assert but handle this case gracefully! */ @@ -290,13 +288,14 @@ ROP2_TO_MIX(pdcattr->jROP2)); EngFreeMem(Points); - DC_vFinishBlit(dc, NULL); } else { Ret = FALSE; } } + + DC_vFinishBlit(dc, NULL); return Ret; } @@ -408,6 +407,9 @@ rcLockRect.bottom += dc->ptlDCOrig.y; DC_vPrepareDCsForBlit(dc, rcLockRect, NULL, rcLockRect); + + if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) + DC_vUpdateLineBrush(dc); Ret = IntGdiLineTo(dc, XEnd, YEnd); Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/path.c [iso-8859-1] Tue Apr 20 22:23:15 2010 @@ -2291,6 +2291,9 @@ return FALSE; } + DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, + NULL, dc->rosdc.CombinedClip->rclBounds); + pdcattr = dc->pdcattr; if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) @@ -2298,9 +2301,6 @@ if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) DC_vUpdateFillBrush(dc); - - DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, - NULL, dc->rosdc.CombinedClip->rclBounds); ret = PATH_FillPath( dc, pPath ); if ( ret ) @@ -2573,6 +2573,9 @@ return FALSE; } + DC_vPrepareDCsForBlit(pDc, pDc->rosdc.CombinedClip->rclBounds, + NULL, pDc->rosdc.CombinedClip->rclBounds); + pdcattr = pDc->pdcattr; if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) @@ -2580,9 +2583,6 @@ if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) DC_vUpdateLineBrush(pDc); - - DC_vPrepareDCsForBlit(pDc, pDc->rosdc.CombinedClip->rclBounds, - NULL, pDc->rosdc.CombinedClip->rclBounds); bRet = PATH_FillPath(pDc, pPath); if (bRet) bRet = PATH_StrokePath(pDc, pPath); @@ -2617,13 +2617,13 @@ return FALSE; } + DC_vPrepareDCsForBlit(pDc, pDc->rosdc.CombinedClip->rclBounds, + NULL, pDc->rosdc.CombinedClip->rclBounds); + pdcattr = pDc->pdcattr; if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY)) DC_vUpdateLineBrush(pDc); - - DC_vPrepareDCsForBlit(pDc, pDc->rosdc.CombinedClip->rclBounds, - NULL, pDc->rosdc.CombinedClip->rclBounds); bRet = PATH_StrokePath(pDc, pPath);
14 years, 8 months
1
0
0
0
[jgardou] 46964: [WIN32K] - Revert r46960 : the correct way to go is to mark brushes as dirty and update them where needed - Do so in GreExtTextOutW, NtGdiBitBlt, NtGdiStrecthBltMask and IntPatBlt - Add a small hack to GreEstTextOutW so we hold the Blit lock when needed without too much pain.
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Apr 20 21:31:45 2010 New Revision: 46964 URL:
http://svn.reactos.org/svn/reactos?rev=46964&view=rev
Log: [WIN32K] - Revert r46960 : the correct way to go is to mark brushes as dirty and update them where needed - Do so in GreExtTextOutW, NtGdiBitBlt, NtGdiStrecthBltMask and IntPatBlt - Add a small hack to GreEstTextOutW so we hold the Blit lock when needed without too much pain. Modified: 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/freetype.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] Tue Apr 20 21:31:45 2010 @@ -229,9 +229,6 @@ pdcattr = DCDest->pdcattr; - if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) - DC_vUpdateFillBrush(DCDest); - DestRect.left = XDest; DestRect.top = YDest; DestRect.right = XDest+Width; @@ -261,6 +258,9 @@ /* Prepare blit */ DC_vPrepareDCsForBlit(DCDest, DestRect, DCSrc, SourceRect); + + if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(DCDest); /* Determine surfaces to be used in the bitblt */ BitmapDest = DCDest->dclevel.pSurface; @@ -781,9 +781,6 @@ pdcattr = DCDest->pdcattr; - if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) - DC_vUpdateFillBrush(DCDest); - DestRect.left = XOriginDest; DestRect.top = YOriginDest; DestRect.right = XOriginDest+WidthDest; @@ -815,6 +812,9 @@ /* Only prepare Source and Dest, hdcMask represents a DIB */ DC_vPrepareDCsForBlit(DCDest, DestRect, DCSrc, SourceRect); + + if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(DCDest); /* Determine surfaces to be used in the bitblt */ BitmapDest = DCDest->dclevel.pSurface; @@ -936,7 +936,6 @@ { RECTL DestRect; SURFACE *psurf; - EBRUSHOBJ eboFill; POINTL BrushOrigin; BOOL ret; @@ -983,7 +982,8 @@ psurf = pdc->dclevel.pSurface; - EBRUSHOBJ_vInit(&eboFill, pbrush, pdc); + if (pdc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) + DC_vUpdateFillBrush(pdc); ret = IntEngBitBlt( &psurf->SurfObj, @@ -994,11 +994,9 @@ &DestRect, NULL, NULL, - &eboFill.BrushObject, // use pDC->eboFill + &pdc->eboFill.BrushObject, &BrushOrigin, ROP3_TO_ROP4(dwRop)); - - EBRUSHOBJ_vCleanup(&eboFill); DC_vFinishBlit(pdc, NULL); 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] Tue Apr 20 21:31:45 2010 @@ -478,15 +478,8 @@ pdc->flGraphicsCaps = ppdev->devinfo.flGraphicsCaps; pdc->flGraphicsCaps2 = ppdev->devinfo.flGraphicsCaps2; - /* re-Initialize EBRUSHOBJs */ - EBRUSHOBJ_vCleanup(&pdc->eboFill); - EBRUSHOBJ_vInit(&pdc->eboFill, pdc->dclevel.pbrFill, pdc); - EBRUSHOBJ_vCleanup(&pdc->eboLine); - EBRUSHOBJ_vInit(&pdc->eboLine, pdc->dclevel.pbrLine, pdc); - EBRUSHOBJ_vCleanup(&pdc->eboText); - EBRUSHOBJ_vInit(&pdc->eboText, pbrDefaultBrush, pdc); - EBRUSHOBJ_vCleanup(&pdc->eboBackground); - EBRUSHOBJ_vInit(&pdc->eboBackground, pbrDefaultBrush, pdc); + /* Mark EBRUSHOBJs as dirty */ + pdc->pdcattr->ulDirty_ |= DIRTY_DEFAULT ; } /* Prepare a blit for up to 2 DCs */ Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Tue Apr 20 21:31:45 2010 @@ -3153,7 +3153,7 @@ LONGLONG TextLeft, RealXStart; ULONG TextTop, previous, BackgroundLeft; FT_Bool use_kerning; - RECTL DestRect, MaskRect; + RECTL DestRect, MaskRect, DummyRect = {0, 0, 0, 0}; POINTL SourcePoint, BrushOrigin; HBITMAP HSourceGlyph; SURFOBJ *SourceGlyphSurf; @@ -3189,9 +3189,6 @@ pdcattr = dc->pdcattr; - if (pdcattr->ulDirty_ & DIRTY_TEXT) - DC_vUpdateTextBrush(dc); - if ((fuOptions & ETO_OPAQUE) || pdcattr->jBkMode == OPAQUE) { if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) @@ -3225,13 +3222,6 @@ IntLPtoDP(dc, (POINT *)lprc, 2); } - psurf = dc->dclevel.pSurface; - if (!psurf) - { - goto fail; - } - SurfObj = &psurf->SurfObj; - Start.x = XStart; Start.y = YStart; IntLPtoDP(dc, &Start, 1); @@ -3262,8 +3252,11 @@ DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect); + if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) + DC_vUpdateBackgroundBrush(dc); + IntEngBitBlt( - &psurf->SurfObj, + &dc->dclevel.pSurface->SurfObj, NULL, NULL, dc->rosdc.CombinedClip, @@ -3440,6 +3433,12 @@ TextTop = YStart; BackgroundLeft = (RealXStart + 32) >> 6; + /* Lock blit with a dummy rect */ + DC_vPrepareDCsForBlit(dc, DummyRect, NULL, DummyRect); + + psurf = dc->dclevel.pSurface ; + SurfObj = &psurf->SurfObj ; + /* Create the xlateobj */ hDestPalette = psurf->hDIBPalette; if (!hDestPalette) hDestPalette = pPrimarySurface->devinfo.hpalDefault; @@ -3450,6 +3449,11 @@ EXLATEOBJ_vInitialize(&exloDst2RGB, ppalDst, &gpalRGB, 0, 0, 0); PALETTE_UnlockPalette(ppalDst); + if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND)) + DC_vUpdateBackgroundBrush(dc) ; + + if(dc->pdcattr->ulDirty_ & DIRTY_TEXT) + DC_vUpdateTextBrush(dc) ; /* * The main rendering loop. @@ -3613,6 +3617,7 @@ } IntUnLockFreeType; + DC_vFinishBlit(dc, NULL) ; EXLATEOBJ_vCleanup(&exloRGB2Dst); EXLATEOBJ_vCleanup(&exloDst2RGB); if (TextObj != NULL)
14 years, 8 months
1
0
0
0
[gschneider] 46963: [NTVDM] Load resource strings in Unicode when printing them in Unicode
by gschneider@svn.reactos.org
Author: gschneider Date: Tue Apr 20 20:59:58 2010 New Revision: 46963 URL:
http://svn.reactos.org/svn/reactos?rev=46963&view=rev
Log: [NTVDM] Load resource strings in Unicode when printing them in Unicode Modified: trunk/reactos/subsystems/ntvdm/ntvdm.c Modified: trunk/reactos/subsystems/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/ntvdm.c?r…
============================================================================== --- trunk/reactos/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/ntvdm.c [iso-8859-1] Tue Apr 20 20:59:58 2010 @@ -282,8 +282,8 @@ WCHAR PromptMsg[RC_STRING_MAX_SIZE]; CHAR InputBuffer[255]; - LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg, (LPTSTR) WelcomeMsg,sizeof(WelcomeMsg) / sizeof(WelcomeMsg[0])); - LoadString( GetModuleHandle(NULL), STRING_PromptMsg, (LPTSTR) PromptMsg ,sizeof(PromptMsg) / sizeof(PromptMsg[0])); + LoadStringW( GetModuleHandle(NULL), STRING_WelcomeMsg, WelcomeMsg,sizeof(WelcomeMsg) / sizeof(WelcomeMsg[0])); + LoadStringW( GetModuleHandle(NULL), STRING_PromptMsg, PromptMsg ,sizeof(PromptMsg) / sizeof(PromptMsg[0])); AllocConsole(); SetConsoleTitleW(L"ntvdm");
14 years, 8 months
1
0
0
0
[fireball] 46962: - If MSDN says "BOOLEAN", let it be "BOOLEAN". Fixes build.
by fireball@svn.reactos.org
Author: fireball Date: Tue Apr 20 20:55:05 2010 New Revision: 46962 URL:
http://svn.reactos.org/svn/reactos?rev=46962&view=rev
Log: - If MSDN says "BOOLEAN", let it be "BOOLEAN". Fixes build. Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/st…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] Tue Apr 20 20:55:05 2010 @@ -885,9 +885,9 @@ return 0; } -BOOL -WINAPI -Wow64EnableWow64FsRedirection (BOOL Wow64EnableWow64FsRedirection) +BOOLEAN +WINAPI +Wow64EnableWow64FsRedirection (BOOLEAN Wow64EnableWow64FsRedirection) { STUB; return FALSE;
14 years, 8 months
1
0
0
0
[jimtabor] 46961: [User32] - Dmitry Timoshkov : Do not ask DrawFrameControl() to modify the passed in rectangle. - Nikolay Sivov : Set WM_EXITMENULOOP wParam same way as for WM_ENTERMENULOOP.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Apr 20 20:36:39 2010 New Revision: 46961 URL:
http://svn.reactos.org/svn/reactos?rev=46961&view=rev
Log: [User32] - Dmitry Timoshkov : Do not ask DrawFrameControl() to modify the passed in rectangle. - Nikolay Sivov : Set WM_EXITMENULOOP wParam same way as for WM_ENTERMENULOOP. Modified: trunk/reactos/dll/win32/user32/controls/button.c trunk/reactos/dll/win32/user32/windows/menu.c Modified: trunk/reactos/dll/win32/user32/controls/button.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
============================================================================== --- trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] Tue Apr 20 20:36:39 2010 @@ -829,7 +829,7 @@ */ static void PB_Paint( HWND hwnd, HDC hDC, UINT action ) { - RECT rc, focus_rect, r; + RECT rc, r; UINT dtFlags, uState; HPEN hOldPen; HBRUSH hOldBrush; @@ -865,13 +865,11 @@ Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom); InflateRect( &rc, -1, -1 ); } - - focus_rect = rc; /* completely skip the drawing if only focus has changed */ if (action == ODA_FOCUS) goto draw_focus; - uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT; + uState = DFCS_BUTTONPUSH; if (style & BS_FLAT) uState |= DFCS_MONO; @@ -898,8 +896,6 @@ if (pushedState) OffsetRect(&r, 1, 1); - IntersectClipRect(hDC, rc.left, rc.top, rc.right, rc.bottom); - oldTxtColor = SetTextColor( hDC, GetSysColor(COLOR_BTNTEXT) ); BUTTON_DrawLabel(hwnd, hDC, dtFlags, &r); @@ -912,9 +908,8 @@ { if (!(get_ui_state(hwnd) & UISF_HIDEFOCUS)) { - InflateRect( &focus_rect, -1, -1 ); - IntersectRect(&focus_rect, &focus_rect, &rc); - DrawFocusRect( hDC, &focus_rect ); + InflateRect( &rc, -2, -2 ); + DrawFocusRect( hDC, &rc ); } } Modified: trunk/reactos/dll/win32/user32/windows/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Tue Apr 20 20:36:39 2010 @@ -3524,11 +3524,11 @@ /*********************************************************************** * MenuExitTracking */ -static BOOL FASTCALL MenuExitTracking(HWND hWnd) +static BOOL FASTCALL MenuExitTracking(HWND hWnd, BOOL bPopup) { TRACE("hwnd=%p\n", hWnd); - SendMessageW( hWnd, WM_EXITMENULOOP, 0, 0 ); + SendMessageW( hWnd, WM_EXITMENULOOP, bPopup, 0 ); ShowCaret(0); top_popup = 0; top_popup_hmenu = NULL; @@ -3558,7 +3558,7 @@ MenuInitTracking(hWnd, hMenu, FALSE, wFlags); MenuTrackMenu(hMenu, wFlags, pt.x, pt.y, hWnd, NULL); - MenuExitTracking(hWnd); + MenuExitTracking(hWnd, FALSE); } } @@ -3633,7 +3633,7 @@ track_menu: MenuTrackMenu( hTrackMenu, wFlags, 0, 0, hwnd, NULL ); - MenuExitTracking( hwnd ); + MenuExitTracking( hwnd, FALSE ); } @@ -3660,7 +3660,7 @@ if (MenuShowPopup(Wnd, Menu, 0, Flags, x, y, 0, 0 )) ret = MenuTrackMenu(Menu, Flags | TPM_POPUPMENU, 0, 0, Wnd, Tpm ? &Tpm->rcExclude : NULL); - MenuExitTracking(Wnd); + MenuExitTracking(Wnd, TRUE); return ret; }
14 years, 8 months
1
0
0
0
[jgardou] 46960: [WIN32K] - Reinitialize EBRUSHOBJs instead of marking them as dirty when switching modes
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Apr 20 19:55:56 2010 New Revision: 46960 URL:
http://svn.reactos.org/svn/reactos?rev=46960&view=rev
Log: [WIN32K] - Reinitialize EBRUSHOBJs instead of marking them as dirty when switching modes Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c 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] Tue Apr 20 19:55:56 2010 @@ -478,7 +478,15 @@ pdc->flGraphicsCaps = ppdev->devinfo.flGraphicsCaps; pdc->flGraphicsCaps2 = ppdev->devinfo.flGraphicsCaps2; - pdc->pdcattr->ulDirty_ |= DIRTY_DEFAULT; + /* re-Initialize EBRUSHOBJs */ + EBRUSHOBJ_vCleanup(&pdc->eboFill); + EBRUSHOBJ_vInit(&pdc->eboFill, pdc->dclevel.pbrFill, pdc); + EBRUSHOBJ_vCleanup(&pdc->eboLine); + EBRUSHOBJ_vInit(&pdc->eboLine, pdc->dclevel.pbrLine, pdc); + EBRUSHOBJ_vCleanup(&pdc->eboText); + EBRUSHOBJ_vInit(&pdc->eboText, pbrDefaultBrush, pdc); + EBRUSHOBJ_vCleanup(&pdc->eboBackground); + EBRUSHOBJ_vInit(&pdc->eboBackground, pbrDefaultBrush, pdc); } /* Prepare a blit for up to 2 DCs */
14 years, 8 months
1
0
0
0
[fireball] 46959: - Add Wow64* functions declarations to winbase.h - Export Wow64* functions in kernel32, because 32bit Windows also exports them. - Sync ole32, oleaut32 with Wine-1.1.43.
by fireball@svn.reactos.org
Author: fireball Date: Tue Apr 20 19:36:44 2010 New Revision: 46959 URL:
http://svn.reactos.org/svn/reactos?rev=46959&view=rev
Log: - Add Wow64* functions declarations to winbase.h - Export Wow64* functions in kernel32, because 32bit Windows also exports them. - Sync ole32, oleaut32 with Wine-1.1.43. Modified: trunk/reactos/dll/win32/kernel32/kernel32.pspec trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/ole32/ftmarshal.c trunk/reactos/dll/win32/ole32/ifs.c trunk/reactos/dll/win32/ole32/moniker.c trunk/reactos/dll/win32/ole32/ole32.rbuild trunk/reactos/dll/win32/ole32/rpc.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/dll/win32/ole32/storage32.h trunk/reactos/dll/win32/oleaut32/olepicture.c trunk/reactos/dll/win32/oleaut32/regsvr.c trunk/reactos/dll/win32/oleaut32/typelib.c trunk/reactos/dll/win32/oleaut32/typelib2.c trunk/reactos/dll/win32/oleaut32/vartype.c trunk/reactos/include/psdk/winbase.h Modified: trunk/reactos/dll/win32/kernel32/kernel32.pspec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -966,11 +966,9 @@ @ stdcall WaitNamedPipeW (wstr long) @ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr) @ stdcall WinExec(str long) -#ifdef _M_AMD64 @ stdcall Wow64EnableWow64FsRedirection(long) @ stdcall Wow64DisableWow64FsRedirection(long) @ stdcall Wow64RevertWow64FsRedirection(long) -#endif @ stdcall WriteConsoleA(long ptr long ptr ptr) @ stdcall WriteConsoleInputA(long ptr long ptr) @ stdcall WriteConsoleInputVDMA(long long long long) Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
============================================================================== --- trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -1506,7 +1506,7 @@ * SEE ALSO * StringFromCLSID */ -static HRESULT __CLSIDFromString(LPCWSTR s, CLSID *id) +static HRESULT __CLSIDFromString(LPCWSTR s, LPCLSID id) { int i; BYTE table[256]; @@ -4153,11 +4153,9 @@ case DLL_PROCESS_ATTACH: hProxyDll = hinstDLL; COMPOBJ_InitProcess(); - if (TRACE_ON(ole)) CoRegisterMallocSpy((LPVOID)-1); break; case DLL_PROCESS_DETACH: - if (TRACE_ON(ole)) CoRevokeMallocSpy(); OLEDD_UnInitialize(); COMPOBJ_UninitProcess(); RPC_UnregisterAllChannelHooks(); Modified: trunk/reactos/dll/win32/ole32/ftmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ftmarshal.…
============================================================================== --- trunk/reactos/dll/win32/ole32/ftmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ftmarshal.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -204,8 +204,11 @@ hres = IStream_Write (pStm, &object, sizeof (object), NULL); if (hres != S_OK) return STG_E_MEDIUMFULL; - hres = IStream_Write (pStm, &constant, sizeof (constant), NULL); - if (hres != S_OK) return STG_E_MEDIUMFULL; + if (sizeof(object) == sizeof(DWORD)) + { + hres = IStream_Write (pStm, &constant, sizeof (constant), NULL); + if (hres != S_OK) return STG_E_MEDIUMFULL; + } hres = IStream_Write (pStm, &unknown_guid, sizeof (unknown_guid), NULL); if (hres != S_OK) return STG_E_MEDIUMFULL; @@ -237,10 +240,13 @@ hres = IStream_Read (pStm, &object, sizeof (object), NULL); if (hres != S_OK) return STG_E_READFAULT; - hres = IStream_Read (pStm, &constant, sizeof (constant), NULL); - if (hres != S_OK) return STG_E_READFAULT; - if (constant != 0) - FIXME("constant is 0x%x instead of 0\n", constant); + if (sizeof(object) == sizeof(DWORD)) + { + hres = IStream_Read (pStm, &constant, sizeof (constant), NULL); + if (hres != S_OK) return STG_E_READFAULT; + if (constant != 0) + FIXME("constant is 0x%x instead of 0\n", constant); + } hres = IStream_Read (pStm, &unknown_guid, sizeof (unknown_guid), NULL); if (hres != S_OK) return STG_E_READFAULT; @@ -267,10 +273,13 @@ hres = IStream_Read (pStm, &object, sizeof (object), NULL); if (hres != S_OK) return STG_E_READFAULT; - hres = IStream_Read (pStm, &constant, sizeof (constant), NULL); - if (hres != S_OK) return STG_E_READFAULT; - if (constant != 0) - FIXME("constant is 0x%x instead of 0\n", constant); + if (sizeof(object) == sizeof(DWORD)) + { + hres = IStream_Read (pStm, &constant, sizeof (constant), NULL); + if (hres != S_OK) return STG_E_READFAULT; + if (constant != 0) + FIXME("constant is 0x%x instead of 0\n", constant); + } hres = IStream_Read (pStm, &unknown_guid, sizeof (unknown_guid), NULL); if (hres != S_OK) return STG_E_READFAULT; Modified: trunk/reactos/dll/win32/ole32/ifs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ifs.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/ole32/ifs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ifs.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -360,173 +360,6 @@ }; /****************************************************************************** - * IMallocSpy implementation - *****************************************************************************/ - -/* set the vtable later */ -static const IMallocSpyVtbl VT_IMallocSpy; - -typedef struct { - const IMallocSpyVtbl *lpVtbl; - LONG ref; -} _MallocSpy; - -/* this is the static object instance */ -static _MallocSpy MallocSpy = {&VT_IMallocSpy, 0}; - -/****************************************************************************** - * IMalloc32_QueryInterface [VTABLE] - */ -static HRESULT WINAPI IMallocSpy_fnQueryInterface(LPMALLOCSPY iface,REFIID refiid,LPVOID *obj) -{ - - TRACE("(%s,%p)\n",debugstr_guid(refiid),obj); - - if (IsEqualIID(&IID_IUnknown,refiid) || IsEqualIID(&IID_IMallocSpy,refiid)) { - *obj = &MallocSpy; - return S_OK; - } - return E_NOINTERFACE; -} - -/****************************************************************************** - * IMalloc32_AddRef [VTABLE] - */ -static ULONG WINAPI IMallocSpy_fnAddRef (LPMALLOCSPY iface) -{ - - _MallocSpy *This = (_MallocSpy *)iface; - ULONG ref = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, ref - 1); - - return ref; -} - -/****************************************************************************** - * IMalloc32_AddRelease [VTABLE] - * - * NOTES - * Our MallocSpy is static. If the count reaches 0 we dump the leaks - */ -static ULONG WINAPI IMallocSpy_fnRelease (LPMALLOCSPY iface) -{ - - _MallocSpy *This = (_MallocSpy *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, ref + 1); - - if (!ref) { - /* our allocation list MUST be empty here */ - } - return ref; -} - -static ULONG WINAPI IMallocSpy_fnPreAlloc(LPMALLOCSPY iface, ULONG cbRequest) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%u)\n", This, cbRequest); - return cbRequest; -} -static PVOID WINAPI IMallocSpy_fnPostAlloc(LPMALLOCSPY iface, void* pActual) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p)\n", This, pActual); - return pActual; -} - -static PVOID WINAPI IMallocSpy_fnPreFree(LPMALLOCSPY iface, void* pRequest, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u)\n", This, pRequest, fSpyed); - return pRequest; -} -static void WINAPI IMallocSpy_fnPostFree(LPMALLOCSPY iface, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%u)\n", This, fSpyed); -} - -static ULONG WINAPI IMallocSpy_fnPreRealloc(LPMALLOCSPY iface, void* pRequest, ULONG cbRequest, void** ppNewRequest, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u %u)\n", This, pRequest, cbRequest, fSpyed); - *ppNewRequest = pRequest; - return cbRequest; -} - -static PVOID WINAPI IMallocSpy_fnPostRealloc(LPMALLOCSPY iface, void* pActual, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u)\n", This, pActual, fSpyed); - return pActual; -} - -static PVOID WINAPI IMallocSpy_fnPreGetSize(LPMALLOCSPY iface, void* pRequest, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u)\n", This, pRequest, fSpyed); - return pRequest; -} - -static ULONG WINAPI IMallocSpy_fnPostGetSize(LPMALLOCSPY iface, ULONG cbActual, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%u %u)\n", This, cbActual, fSpyed); - return cbActual; -} - -static PVOID WINAPI IMallocSpy_fnPreDidAlloc(LPMALLOCSPY iface, void* pRequest, BOOL fSpyed) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u)\n", This, pRequest, fSpyed); - return pRequest; -} - -static int WINAPI IMallocSpy_fnPostDidAlloc(LPMALLOCSPY iface, void* pRequest, BOOL fSpyed, int fActual) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->(%p %u %u)\n", This, pRequest, fSpyed, fActual); - return fActual; -} - -static void WINAPI IMallocSpy_fnPreHeapMinimize(LPMALLOCSPY iface) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->()\n", This); -} - -static void WINAPI IMallocSpy_fnPostHeapMinimize(LPMALLOCSPY iface) -{ - _MallocSpy *This = (_MallocSpy *)iface; - TRACE ("(%p)->()\n", This); -} - -static void MallocSpyDumpLeaks(void) { - TRACE("leaks: %u\n", Malloc32.SpyedAllocationsLeft); -} - -static const IMallocSpyVtbl VT_IMallocSpy = -{ - IMallocSpy_fnQueryInterface, - IMallocSpy_fnAddRef, - IMallocSpy_fnRelease, - IMallocSpy_fnPreAlloc, - IMallocSpy_fnPostAlloc, - IMallocSpy_fnPreFree, - IMallocSpy_fnPostFree, - IMallocSpy_fnPreRealloc, - IMallocSpy_fnPostRealloc, - IMallocSpy_fnPreGetSize, - IMallocSpy_fnPostGetSize, - IMallocSpy_fnPreDidAlloc, - IMallocSpy_fnPostDidAlloc, - IMallocSpy_fnPreHeapMinimize, - IMallocSpy_fnPostHeapMinimize -}; - -/****************************************************************************** * CoGetMalloc [OLE32.@] * * Retrieves the current IMalloc interface for the process. @@ -620,9 +453,6 @@ TRACE("\n"); - /* HACK TO ACTIVATE OUT SPY */ - if (pMallocSpy == (LPVOID)-1) pMallocSpy =(IMallocSpy*)&MallocSpy; - if(Malloc32.pSpy) return CO_E_OBJISREG; EnterCriticalSection(&IMalloc32_SpyCS); @@ -660,11 +490,6 @@ TRACE("\n"); EnterCriticalSection(&IMalloc32_SpyCS); - - /* if it's our spy it's time to dump the leaks */ - if (Malloc32.pSpy == (IMallocSpy*)&MallocSpy) { - MallocSpyDumpLeaks(); - } if (Malloc32.SpyedAllocationsLeft) { TRACE("SpyReleasePending with %u allocations left\n", Malloc32.SpyedAllocationsLeft); Modified: trunk/reactos/dll/win32/ole32/moniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/moniker.c?…
============================================================================== --- trunk/reactos/dll/win32/ole32/moniker.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/moniker.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -127,6 +127,7 @@ WCHAR cmd[MAX_PATH]; static const WCHAR rpcss[] = {'\\','r','p','c','s','s','.','e','x','e',0}; BOOL rslt; + void *redir; TRACE("\n"); @@ -135,7 +136,9 @@ GetSystemDirectoryW( cmd, MAX_PATH - sizeof(rpcss)/sizeof(WCHAR) ); strcatW( cmd, rpcss ); + Wow64DisableWow64FsRedirection( &redir ); rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); + Wow64RevertWow64FsRedirection( redir ); if (rslt) { Modified: trunk/reactos/dll/win32/ole32/ole32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.rbui…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole32.rbuild [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -20,6 +20,7 @@ <library>ole32_irot_client</library> <library>ole32_proxy</library> <library>rpcrt4</library> + <library>kernel32</library> <library>ntdll</library> <library>uuid</library> <library>pseh</library> Modified: trunk/reactos/dll/win32/ole32/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/rpc.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/ole32/rpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/rpc.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -144,6 +144,28 @@ /* [size_is((size+7)&~7)] */ unsigned char data[1]; } WIRE_ORPC_EXTENT; +typedef struct +{ + ULONG size; + ULONG reserved; + unsigned char extent[1]; +} WIRE_ORPC_EXTENT_ARRAY; + +typedef struct +{ + ULONG version; + ULONG flags; + ULONG reserved1; + GUID cid; + unsigned char extensions[1]; +} WIRE_ORPCTHIS; + +typedef struct +{ + ULONG flags; + unsigned char extensions[1]; +} WIRE_ORPCTHAT; + struct channel_hook_entry { struct list entry; @@ -503,10 +525,10 @@ extensions_size = ChannelHooks_ServerGetSize(&message_state->channel_hook_info, &channel_hook_data, &channel_hook_count, &extension_count); - msg->BufferLength += FIELD_OFFSET(ORPCTHAT, extensions) + 4; + msg->BufferLength += FIELD_OFFSET(WIRE_ORPCTHAT, extensions) + sizeof(DWORD); if (extensions_size) { - msg->BufferLength += FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent) + 2*sizeof(DWORD) + extensions_size; + msg->BufferLength += FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent[2*sizeof(DWORD) + extensions_size]); if (extension_count & 1) msg->BufferLength += FIELD_OFFSET(WIRE_ORPC_EXTENT, data[0]); } @@ -523,7 +545,7 @@ status = I_RpcGetBuffer(msg); orpcthat = msg->Buffer; - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPCTHAT, extensions); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPCTHAT, extensions); orpcthat->flags = ORPCF_NULL /* FIXME? */; @@ -533,10 +555,10 @@ if (extensions_size) { - ORPC_EXTENT_ARRAY *orpc_extent_array = msg->Buffer; + WIRE_ORPC_EXTENT_ARRAY *orpc_extent_array = msg->Buffer; orpc_extent_array->size = extension_count; orpc_extent_array->reserved = 0; - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent); /* NDR representation of orpc_extent_array->extent */ *(DWORD *)msg->Buffer = 1; msg->Buffer = (char *)msg->Buffer + sizeof(DWORD); @@ -645,10 +667,10 @@ extensions_size = ChannelHooks_ClientGetSize(&message_state->channel_hook_info, &channel_hook_data, &channel_hook_count, &extension_count); - msg->BufferLength += FIELD_OFFSET(ORPCTHIS, extensions) + 4; + msg->BufferLength += FIELD_OFFSET(WIRE_ORPCTHIS, extensions) + sizeof(DWORD); if (extensions_size) { - msg->BufferLength += FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent) + 2*sizeof(DWORD) + extensions_size; + msg->BufferLength += FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent[2*sizeof(DWORD) + extensions_size]); if (extension_count & 1) msg->BufferLength += FIELD_OFFSET(WIRE_ORPC_EXTENT, data[0]); } @@ -703,7 +725,7 @@ if (status == RPC_S_OK) { orpcthis = msg->Buffer; - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPCTHIS, extensions); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPCTHIS, extensions); orpcthis->version.MajorVersion = COM_MAJOR_VERSION; orpcthis->version.MinorVersion = COM_MINOR_VERSION; @@ -720,7 +742,7 @@ ORPC_EXTENT_ARRAY *orpc_extent_array = msg->Buffer; orpc_extent_array->size = extension_count; orpc_extent_array->reserved = 0; - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent); /* NDR representation of orpc_extent_array->extent */ *(DWORD *)msg->Buffer = 1; msg->Buffer = (char *)msg->Buffer + sizeof(DWORD); @@ -1152,8 +1174,8 @@ DWORD pointer_id; DWORD i; - memcpy(extensions, msg->Buffer, FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent)); - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPC_EXTENT_ARRAY, extent); + memcpy(extensions, msg->Buffer, FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent)); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPC_EXTENT_ARRAY, extent); if ((const char *)msg->Buffer + 2 * sizeof(DWORD) > end) return RPC_E_INVALID_HEADER; @@ -1205,14 +1227,14 @@ *first_wire_orpc_extent = NULL; - if (msg->BufferLength < FIELD_OFFSET(ORPCTHIS, extensions) + 4) + if (msg->BufferLength < FIELD_OFFSET(WIRE_ORPCTHIS, extensions) + sizeof(DWORD)) { ERR("invalid buffer length\n"); return RPC_E_INVALID_HEADER; } - memcpy(orpcthis, msg->Buffer, FIELD_OFFSET(ORPCTHIS, extensions)); - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPCTHIS, extensions); + memcpy(orpcthis, msg->Buffer, FIELD_OFFSET(WIRE_ORPCTHIS, extensions)); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPCTHIS, extensions); if ((const char *)msg->Buffer + sizeof(DWORD) > end) return RPC_E_INVALID_HEADER; @@ -1256,14 +1278,14 @@ *first_wire_orpc_extent = NULL; - if (msg->BufferLength < FIELD_OFFSET(ORPCTHAT, extensions) + 4) + if (msg->BufferLength < FIELD_OFFSET(WIRE_ORPCTHAT, extensions) + sizeof(DWORD)) { ERR("invalid buffer length\n"); return RPC_E_INVALID_HEADER; } - memcpy(orpcthat, msg->Buffer, FIELD_OFFSET(ORPCTHAT, extensions)); - msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(ORPCTHAT, extensions); + memcpy(orpcthat, msg->Buffer, FIELD_OFFSET(WIRE_ORPCTHAT, extensions)); + msg->Buffer = (char *)msg->Buffer + FIELD_OFFSET(WIRE_ORPCTHAT, extensions); if ((const char *)msg->Buffer + sizeof(DWORD) > end) return RPC_E_INVALID_HEADER; Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -2583,6 +2583,7 @@ DWORD openFlags, BOOL fileBased, BOOL create, + ULONG sector_size, StorageImpl** result) { StorageImpl* This; @@ -2634,7 +2635,7 @@ /* * Initialize the big block cache. */ - This->bigBlockSize = DEF_BIG_BLOCK_SIZE; + This->bigBlockSize = sector_size; This->smallBlockSize = DEF_SMALL_BLOCK_SIZE; This->bigBlockFile = BIGBLOCKFILE_Construct(hFile, pLkbyt, @@ -2665,8 +2666,12 @@ This->bigBlockDepotCount = 1; This->bigBlockDepotStart[0] = 0; This->rootStartBlock = 1; + This->smallBlockLimit = LIMIT_TO_USE_SMALL_BLOCK; This->smallBlockDepotStart = BLOCK_END_OF_CHAIN; - This->bigBlockSizeBits = DEF_BIG_BLOCK_SIZE_BITS; + if (sector_size == 4096) + This->bigBlockSizeBits = MAX_BIG_BLOCK_SIZE_BITS; + else + This->bigBlockSizeBits = MIN_BIG_BLOCK_SIZE_BITS; This->smallBlockSizeBits = DEF_SMALL_BLOCK_SIZE_BITS; This->extBigBlockDepotStart = BLOCK_END_OF_CHAIN; This->extBigBlockDepotCount = 0; @@ -2710,6 +2715,8 @@ * Start searching for free blocks with block 0. */ This->prevFreeBlock = 0; + + This->firstFreeSmallBlock = 0; /* * Create the block chain abstractions. @@ -3350,6 +3357,11 @@ StorageUtl_ReadDWord( headerBigBlock, + OFFSET_SMALLBLOCKLIMIT, + &This->smallBlockLimit); + + StorageUtl_ReadDWord( + headerBigBlock, OFFSET_SBDEPOTSTART, &This->smallBlockDepotStart); @@ -3382,9 +3394,11 @@ * blocks, just make sure they are what we're expecting. */ if ((This->bigBlockSize != MIN_BIG_BLOCK_SIZE && This->bigBlockSize != MAX_BIG_BLOCK_SIZE) || - This->smallBlockSize != DEF_SMALL_BLOCK_SIZE) - { - WARN("Broken OLE storage file\n"); + This->smallBlockSize != DEF_SMALL_BLOCK_SIZE || + This->smallBlockLimit != LIMIT_TO_USE_SMALL_BLOCK) + { + FIXME("Broken OLE storage file? bigblock=0x%x, smallblock=0x%x, sblimit=0x%x\n", + This->bigBlockSize, This->smallBlockSize, This->smallBlockLimit); hr = STG_E_INVALIDHEADER; } else @@ -3438,7 +3452,6 @@ StorageUtl_WriteWord(headerBigBlock, 0x18, 0x3b); StorageUtl_WriteWord(headerBigBlock, 0x1a, 0x3); StorageUtl_WriteWord(headerBigBlock, 0x1c, (WORD)-2); - StorageUtl_WriteDWord(headerBigBlock, 0x38, (DWORD)0x1000); } /* @@ -3463,6 +3476,11 @@ headerBigBlock, OFFSET_ROOTSTARTBLOCK, This->rootStartBlock); + + StorageUtl_WriteDWord( + headerBigBlock, + OFFSET_SMALLBLOCKLIMIT, + This->smallBlockLimit); StorageUtl_WriteDWord( headerBigBlock, @@ -4341,13 +4359,14 @@ DWORD openFlags, BOOL fileBased, BOOL create, + ULONG sector_size, StorageBaseImpl** result) { StorageImpl *newStorage; StorageBaseImpl *newTransactedStorage; HRESULT hr; - hr = StorageImpl_Construct(hFile, pwcsName, pLkbyt, openFlags, fileBased, create, &newStorage); + hr = StorageImpl_Construct(hFile, pwcsName, pLkbyt, openFlags, fileBased, create, sector_size, &newStorage); if (FAILED(hr)) goto end; if (openFlags & STGM_TRANSACTED) @@ -4840,6 +4859,7 @@ * Initialize the virtual function table. */ newStorage->base.lpVtbl = &Storage32InternalImpl_Vtbl; + newStorage->base.pssVtbl = &IPropertySetStorage_Vtbl; newStorage->base.baseVtbl = &StorageInternalImpl_BaseVtbl; newStorage->base.openFlags = (openFlags & ~STGM_CREATE); @@ -5710,7 +5730,7 @@ ULARGE_INTEGER offsetOfBlockInDepot; DWORD buffer; ULONG bytesRead; - ULONG blockIndex = 0; + ULONG blockIndex = This->parentStorage->firstFreeSmallBlock; ULONG nextBlockIndex = BLOCK_END_OF_CHAIN; HRESULT res = S_OK; ULONG smallBlocksPerBigBlock; @@ -5818,6 +5838,8 @@ StorageImpl_SaveFileHeader(This->parentStorage); } } + + This->parentStorage->firstFreeSmallBlock = blockIndex+1; smallBlocksPerBigBlock = This->parentStorage->bigBlockSize / This->parentStorage->smallBlockSize; @@ -6117,6 +6139,7 @@ &blockIndex))) return FALSE; SmallBlockChainStream_FreeBlock(This, extraBlock); + This->parentStorage->firstFreeSmallBlock = min(This->parentStorage->firstFreeSmallBlock, extraBlock); extraBlock = blockIndex; } @@ -6291,6 +6314,146 @@ &chainEntry); return chainEntry.size; +} + +static HRESULT create_storagefile( + LPCOLESTR pwcsName, + DWORD grfMode, + DWORD grfAttrs, + STGOPTIONS* pStgOptions, + REFIID riid, + void** ppstgOpen) +{ + StorageBaseImpl* newStorage = 0; + HANDLE hFile = INVALID_HANDLE_VALUE; + HRESULT hr = STG_E_INVALIDFLAG; + DWORD shareMode; + DWORD accessMode; + DWORD creationMode; + DWORD fileAttributes; + WCHAR tempFileName[MAX_PATH]; + + if (ppstgOpen == 0) + return STG_E_INVALIDPOINTER; + + if (pStgOptions->ulSectorSize != MIN_BIG_BLOCK_SIZE && pStgOptions->ulSectorSize != MAX_BIG_BLOCK_SIZE) + return STG_E_INVALIDPARAMETER; + + /* if no share mode given then DENY_NONE is the default */ + if (STGM_SHARE_MODE(grfMode) == 0) + grfMode |= STGM_SHARE_DENY_NONE; + + if ( FAILED( validateSTGM(grfMode) )) + goto end; + + /* StgCreateDocFile seems to refuse readonly access, despite MSDN */ + switch(STGM_ACCESS_MODE(grfMode)) + { + case STGM_WRITE: + case STGM_READWRITE: + break; + default: + goto end; + } + + /* in direct mode, can only use SHARE_EXCLUSIVE */ + if (!(grfMode & STGM_TRANSACTED) && (STGM_SHARE_MODE(grfMode) != STGM_SHARE_EXCLUSIVE)) + goto end; + + /* but in transacted mode, any share mode is valid */ + + /* + * Generate a unique name. + */ + if (pwcsName == 0) + { + WCHAR tempPath[MAX_PATH]; + static const WCHAR prefix[] = { 'S', 'T', 'O', 0 }; + + memset(tempPath, 0, sizeof(tempPath)); + memset(tempFileName, 0, sizeof(tempFileName)); + + if ((GetTempPathW(MAX_PATH, tempPath)) == 0 ) + tempPath[0] = '.'; + + if (GetTempFileNameW(tempPath, prefix, 0, tempFileName) != 0) + pwcsName = tempFileName; + else + { + hr = STG_E_INSUFFICIENTMEMORY; + goto end; + } + + creationMode = TRUNCATE_EXISTING; + } + else + { + creationMode = GetCreationModeFromSTGM(grfMode); + } + + /* + * Interpret the STGM value grfMode + */ + shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + accessMode = GetAccessModeFromSTGM(grfMode); + + if (grfMode & STGM_DELETEONRELEASE) + fileAttributes = FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_DELETE_ON_CLOSE; + else + fileAttributes = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS; + + if (STGM_SHARE_MODE(grfMode) && !(grfMode & STGM_SHARE_DENY_NONE)) + { + static int fixme; + if (!fixme++) + FIXME("Storage share mode not implemented.\n"); + } + + *ppstgOpen = 0; + + hFile = CreateFileW(pwcsName, + accessMode, + shareMode, + NULL, + creationMode, + fileAttributes, + 0); + + if (hFile == INVALID_HANDLE_VALUE) + { + if(GetLastError() == ERROR_FILE_EXISTS) + hr = STG_E_FILEALREADYEXISTS; + else + hr = E_FAIL; + goto end; + } + + /* + * Allocate and initialize the new IStorage32object. + */ + hr = Storage_Construct( + hFile, + pwcsName, + NULL, + grfMode, + TRUE, + TRUE, + pStgOptions->ulSectorSize, + &newStorage); + + if (FAILED(hr)) + { + goto end; + } + + hr = IStorage_QueryInterface((IStorage*)newStorage, riid, ppstgOpen); + + IStorage_Release((IStorage*)newStorage); + +end: + TRACE("<-- %p r = %08x\n", *ppstgOpen, hr); + + return hr; } /****************************************************************************** @@ -6318,14 +6481,7 @@ DWORD reserved, IStorage **ppstgOpen) { - StorageBaseImpl* newStorage = 0; - HANDLE hFile = INVALID_HANDLE_VALUE; - HRESULT hr = STG_E_INVALIDFLAG; - DWORD shareMode; - DWORD accessMode; - DWORD creationMode; - DWORD fileAttributes; - WCHAR tempFileName[MAX_PATH]; + STGOPTIONS stgoptions = {1, 0, 512}; TRACE("(%s, %x, %d, %p)\n", debugstr_w(pwcsName), grfMode, @@ -6336,121 +6492,7 @@ if (reserved != 0) return STG_E_INVALIDPARAMETER; - /* if no share mode given then DENY_NONE is the default */ - if (STGM_SHARE_MODE(grfMode) == 0) - grfMode |= STGM_SHARE_DENY_NONE; - - if ( FAILED( validateSTGM(grfMode) )) - goto end; - - /* StgCreateDocFile seems to refuse readonly access, despite MSDN */ - switch(STGM_ACCESS_MODE(grfMode)) - { - case STGM_WRITE: - case STGM_READWRITE: - break; - default: - goto end; - } - - /* in direct mode, can only use SHARE_EXCLUSIVE */ - if (!(grfMode & STGM_TRANSACTED) && (STGM_SHARE_MODE(grfMode) != STGM_SHARE_EXCLUSIVE)) - goto end; - - /* but in transacted mode, any share mode is valid */ - - /* - * Generate a unique name. - */ - if (pwcsName == 0) - { - WCHAR tempPath[MAX_PATH]; - static const WCHAR prefix[] = { 'S', 'T', 'O', 0 }; - - memset(tempPath, 0, sizeof(tempPath)); - memset(tempFileName, 0, sizeof(tempFileName)); - - if ((GetTempPathW(MAX_PATH, tempPath)) == 0 ) - tempPath[0] = '.'; - - if (GetTempFileNameW(tempPath, prefix, 0, tempFileName) != 0) - pwcsName = tempFileName; - else - { - hr = STG_E_INSUFFICIENTMEMORY; - goto end; - } - - creationMode = TRUNCATE_EXISTING; - } - else - { - creationMode = GetCreationModeFromSTGM(grfMode); - } - - /* - * Interpret the STGM value grfMode - */ - shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - accessMode = GetAccessModeFromSTGM(grfMode); - - if (grfMode & STGM_DELETEONRELEASE) - fileAttributes = FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_DELETE_ON_CLOSE; - else - fileAttributes = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS; - - if (STGM_SHARE_MODE(grfMode) && !(grfMode & STGM_SHARE_DENY_NONE)) - { - static int fixme; - if (!fixme++) - FIXME("Storage share mode not implemented.\n"); - } - - *ppstgOpen = 0; - - hFile = CreateFileW(pwcsName, - accessMode, - shareMode, - NULL, - creationMode, - fileAttributes, - 0); - - if (hFile == INVALID_HANDLE_VALUE) - { - if(GetLastError() == ERROR_FILE_EXISTS) - hr = STG_E_FILEALREADYEXISTS; - else - hr = E_FAIL; - goto end; - } - - /* - * Allocate and initialize the new IStorage32object. - */ - hr = Storage_Construct( - hFile, - pwcsName, - NULL, - grfMode, - TRUE, - TRUE, - &newStorage); - - if (FAILED(hr)) - { - goto end; - } - - /* - * Get an "out" pointer for the caller. - */ - *ppstgOpen = (IStorage*)newStorage; - -end: - TRACE("<-- %p r = %08x\n", *ppstgOpen, hr); - - return hr; + return create_storagefile(pwcsName, grfMode, 0, &stgoptions, &IID_IStorage, (void**)ppstgOpen); } /****************************************************************************** @@ -6481,9 +6523,9 @@ if (stgfmt == STGFMT_STORAGE || stgfmt == STGFMT_DOCFILE) { - FIXME("Stub: calling StgCreateDocfile, but ignoring pStgOptions and grfAttrs\n"); - return StgCreateDocfile(pwcsName, grfMode, 0, (IStorage **)ppObjectOpen); - } + return create_storagefile(pwcsName, grfMode, grfAttrs, pStgOptions, riid, ppObjectOpen); + } + ERR("Invalid stgfmt argument\n"); return STG_E_INVALIDPARAMETER; @@ -6707,6 +6749,7 @@ grfMode, TRUE, FALSE, + 512, &newStorage); if (FAILED(hr)) @@ -6754,6 +6797,7 @@ grfMode, FALSE, TRUE, + 512, &newStorage); if (FAILED(hr)) @@ -6801,6 +6845,7 @@ grfMode, FALSE, FALSE, + 512, &newStorage); if (FAILED(hr)) Modified: trunk/reactos/dll/win32/ole32/storage32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.h [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -46,6 +46,7 @@ static const ULONG OFFSET_SMALLBLOCKSIZEBITS = 0x00000020; static const ULONG OFFSET_BBDEPOTCOUNT = 0x0000002C; static const ULONG OFFSET_ROOTSTARTBLOCK = 0x00000030; +static const ULONG OFFSET_SMALLBLOCKLIMIT = 0x00000038; static const ULONG OFFSET_SBDEPOTSTART = 0x0000003C; static const ULONG OFFSET_SBDEPOTCOUNT = 0x00000040; static const ULONG OFFSET_EXTBBDEPOTSTART = 0x00000044; @@ -65,6 +66,8 @@ static const ULONG OFFSET_PS_STARTBLOCK = 0x00000074; static const ULONG OFFSET_PS_SIZE = 0x00000078; static const WORD DEF_BIG_BLOCK_SIZE_BITS = 0x0009; +static const WORD MIN_BIG_BLOCK_SIZE_BITS = 0x0009; +static const WORD MAX_BIG_BLOCK_SIZE_BITS = 0x000c; static const WORD DEF_SMALL_BLOCK_SIZE_BITS = 0x0006; static const WORD DEF_BIG_BLOCK_SIZE = 0x0200; static const WORD DEF_SMALL_BLOCK_SIZE = 0x0040; @@ -97,6 +100,8 @@ #define STGTY_ROOT 0x05 #define COUNT_BBDEPOTINHEADER 109 + +/* FIXME: This value is stored in the header, but we hard-code it to 0x1000. */ #define LIMIT_TO_USE_SMALL_BLOCK 0x1000 #define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) @@ -351,6 +356,7 @@ ULONG smallBlockSize; ULONG bigBlockDepotCount; ULONG rootStartBlock; + ULONG smallBlockLimit; ULONG smallBlockDepotStart; ULONG extBigBlockDepotStart; ULONG extBigBlockDepotCount; @@ -359,6 +365,9 @@ ULONG blockDepotCached[MAX_BIG_BLOCK_SIZE / 4]; ULONG indexBlockDepotCached; ULONG prevFreeBlock; + + /* All small blocks before this one are known to be in use. */ + ULONG firstFreeSmallBlock; /* * Abstraction of the big block chains for the chains of the header. Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -1273,7 +1273,7 @@ static HRESULT OLEPictureImpl_LoadAPM(OLEPictureImpl *This, const BYTE *data, ULONG size) { - APM_HEADER *header = (APM_HEADER *)data; + const APM_HEADER *header = (const APM_HEADER *)data; HMETAFILE hmf; if (size < sizeof(APM_HEADER)) Modified: trunk/reactos/dll/win32/oleaut32/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/regsvr.…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/regsvr.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -480,6 +480,12 @@ "Obsolete Font", "OldFont" }, + { &IID_ISupportErrorInfo, + "PSSupportErrorInfo", + "ole2disp.dll", + "oleaut32.dll", + NULL + }, { NULL } /* list terminator */ }; Modified: trunk/reactos/dll/win32/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -283,30 +283,9 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath, ITypeLib2 **ppTypeLib); -/**************************************************************************** - * QueryPathOfRegTypeLib [OLEAUT32.164] - * - * Gets the path to a registered type library. - * - * PARAMS - * guid [I] referenced guid - * wMaj [I] major version - * wMin [I] minor version - * lcid [I] locale id - * path [O] path of typelib - * - * RETURNS - * Success: S_OK. - * Failure: If the type library is not registered then TYPE_E_LIBNOTREGISTERED - * or TYPE_E_REGISTRYACCESS if the type library registration key couldn't be - * opened. - */ -HRESULT WINAPI QueryPathOfRegTypeLib( - REFGUID guid, - WORD wMaj, - WORD wMin, - LCID lcid, - LPBSTR path ) +/* Get the path to a registered type library. Helper for QueryPathOfRegTypeLib. */ +static HRESULT query_typelib_path( REFGUID guid, WORD wMaj, WORD wMin, + SYSKIND syskind, LCID lcid, LPBSTR path ) { HRESULT hr = TYPE_E_LIBNOTREGISTERED; LCID myLCID = lcid; @@ -336,7 +315,7 @@ { LONG dwPathLen = sizeof(Path); - get_lcid_subkey( myLCID, SYS_WIN32, buffer ); + get_lcid_subkey( myLCID, syskind, buffer ); if (RegQueryValueW(hkey, buffer, Path, &dwPathLen)) { @@ -366,6 +345,29 @@ RegCloseKey( hkey ); TRACE_(typelib)("-- 0x%08x\n", hr); return hr; +} + +/**************************************************************************** + * QueryPathOfRegTypeLib [OLEAUT32.164] + * + * Gets the path to a registered type library. + * + * PARAMS + * guid [I] referenced guid + * wMaj [I] major version + * wMin [I] minor version + * lcid [I] locale id + * path [O] path of typelib + * + * RETURNS + * Success: S_OK. + * Failure: If the type library is not registered then TYPE_E_LIBNOTREGISTERED + * or TYPE_E_REGISTRYACCESS if the type library registration key couldn't be + * opened. + */ +HRESULT WINAPI QueryPathOfRegTypeLib( REFGUID guid, WORD wMaj, WORD wMin, LCID lcid, LPBSTR path ) +{ + return query_typelib_path( guid, wMaj, wMin, SYS_WIN32, lcid, path ); } /****************************************************************************** @@ -691,7 +693,10 @@ MESSAGE("\n"); } - if (tattr->wTypeFlags & (TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL|TYPEFLAG_FDISPATCHABLE)) + /* Register all dispinterfaces (which includes dual interfaces) and + oleautomation interfaces */ + if ((kind == TKIND_INTERFACE && (tattr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) || + kind == TKIND_DISPATCH) { /* register interface<->typelib coupling */ get_interface_key( &tattr->guid, keyName ); @@ -796,7 +801,7 @@ } /* get the path to the typelib on disk */ - if (QueryPathOfRegTypeLib(libid, wVerMajor, wVerMinor, lcid, &tlibPath) != S_OK) { + if (query_typelib_path(libid, wVerMajor, wVerMinor, syskind, lcid, &tlibPath) != S_OK) { result = E_INVALIDARG; goto end; } @@ -832,19 +837,23 @@ goto enddeleteloop; } - /* the path to the type */ - get_interface_key( &typeAttr->guid, subKeyName ); - - /* Delete its bits */ - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, subKeyName, 0, KEY_WRITE, &subKey) != ERROR_SUCCESS) { - goto enddeleteloop; - } - RegDeleteKeyW(subKey, ProxyStubClsidW); - RegDeleteKeyW(subKey, ProxyStubClsid32W); - RegDeleteKeyW(subKey, TypeLibW); - RegCloseKey(subKey); - subKey = NULL; - RegDeleteKeyW(HKEY_CLASSES_ROOT, subKeyName); + if ((kind == TKIND_INTERFACE && (typeAttr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) || + kind == TKIND_DISPATCH) + { + /* the path to the type */ + get_interface_key( &typeAttr->guid, subKeyName ); + + /* Delete its bits */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, subKeyName, 0, KEY_WRITE, &subKey) != ERROR_SUCCESS) + goto enddeleteloop; + + RegDeleteKeyW(subKey, ProxyStubClsidW); + RegDeleteKeyW(subKey, ProxyStubClsid32W); + RegDeleteKeyW(subKey, TypeLibW); + RegCloseKey(subKey); + subKey = NULL; + RegDeleteKeyW(HKEY_CLASSES_ROOT, subKeyName); + } enddeleteloop: if (typeAttr) ITypeInfo_ReleaseTypeAttr(typeInfo, typeAttr); @@ -1901,7 +1910,7 @@ { if (!IS_INTRESOURCE(pFuncRec->OptAttr[2])) ERR("ordinal 0x%08x invalid, IS_INTRESOURCE is false\n", pFuncRec->OptAttr[2]); - (*pptfd)->Entry = (BSTR)pFuncRec->OptAttr[2]; + (*pptfd)->Entry = (BSTR)(DWORD_PTR)LOWORD(pFuncRec->OptAttr[2]); } else { @@ -2927,7 +2936,7 @@ else if(td[0] == VT_CARRAY) { /* array descr table here */ - pTypeLibImpl->pTypeDesc[i].u.lpadesc = (void *)((int) td[2]); /* temp store offset in*/ + pTypeLibImpl->pTypeDesc[i].u.lpadesc = (void *)(INT_PTR)td[2]; /* temp store offset in*/ } else if(td[0] == VT_USERDEFINED) { @@ -2942,7 +2951,7 @@ if(pTypeLibImpl->pTypeDesc[i].vt != VT_CARRAY) continue; if(tlbSegDir.pArrayDescriptions.offset>0) { - MSFT_ReadLEWords(td, sizeof(td), &cx, tlbSegDir.pArrayDescriptions.offset + (int) pTypeLibImpl->pTypeDesc[i].u.lpadesc); + MSFT_ReadLEWords(td, sizeof(td), &cx, tlbSegDir.pArrayDescriptions.offset + (INT_PTR)pTypeLibImpl->pTypeDesc[i].u.lpadesc); pTypeLibImpl->pTypeDesc[i].u.lpadesc = TLB_Alloc(sizeof(ARRAYDESC)+sizeof(SAFEARRAYBOUND)*(td[3]-1)); if(td[1]<0) @@ -4779,13 +4788,7 @@ &subtypeinfo, &subdesckind, &subbindptr); if (SUCCEEDED(hr) && (subdesckind != DESCKIND_NONE)) { - TYPEDESC tdesc_appobject = - { - { - (TYPEDESC *)pTypeInfo->hreftype - }, - VT_USERDEFINED - }; + TYPEDESC tdesc_appobject; const VARDESC vardesc_appobject = { -2, /* memid */ @@ -4806,6 +4809,9 @@ 0, /* wVarFlags */ VAR_STATIC /* varkind */ }; + + tdesc_appobject.u.hreftype = pTypeInfo->hreftype; + tdesc_appobject.vt = VT_USERDEFINED; TRACE("found in implicit app object: %s\n", debugstr_w(szName)); @@ -5696,7 +5702,8 @@ if (TRACE_ON(ole)) { int i; TRACE("Calling %p(",func); - for (i=0;i<nrargs;i++) TRACE("%08x,",args[i]); + for (i=0;i<min(nrargs,30);i++) TRACE("%08x,",args[i]); + if (nrargs > 30) TRACE("..."); TRACE(")\n"); } @@ -6102,10 +6109,11 @@ continue; } + src_arg = NULL; + if (cNamedArgs) { USHORT j; - src_arg = NULL; for (j = 0; j < cNamedArgs; j++) if (rgdispidNamedArgs[j] == i || (i == func_desc->cParams-1 && rgdispidNamedArgs[j] == DISPID_PROPERTYPUT)) { @@ -6113,9 +6121,10 @@ break; } } - else + + if (!src_arg && vargs_converted + cNamedArgs < pDispParams->cArgs) { - src_arg = vargs_converted < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - vargs_converted] : NULL; + src_arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - vargs_converted]; vargs_converted++; } @@ -6596,7 +6605,7 @@ if (pBstrName) *pBstrName = NULL; if (pwOrdinal) - *pwOrdinal = (DWORD)pFDesc->Entry; + *pwOrdinal = LOWORD(pFDesc->Entry); return S_OK; } return TYPE_E_ELEMENTNOTFOUND; Modified: trunk/reactos/dll/win32/oleaut32/typelib2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -2456,7 +2456,7 @@ return hres; } - This->typeinfo->cbSizeVft = typeattr->cbSizeVft; + This->typeinfo->cbSizeVft = typeattr->cbSizeVft * 4 / sizeof(void *); ITypeInfo_ReleaseTypeAttr(inherited, typeattr); ITypeInfo_Release(inherited); @@ -2928,7 +2928,7 @@ (*ppTypeAttr)->cFuncs += 7; (*ppTypeAttr)->cVars = This->typeinfo->cElement>>16; (*ppTypeAttr)->cImplTypes = This->typeinfo->cImplTypes; - (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 28 : This->typeinfo->cbSizeVft; + (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 7 * sizeof(void*) : This->typeinfo->cbSizeVft; (*ppTypeAttr)->cbAlignment = (This->typeinfo->typekind>>11) & 0x1f; (*ppTypeAttr)->wTypeFlags = This->typeinfo->flags; (*ppTypeAttr)->wMajorVerNum = This->typeinfo->version&0xffff; Modified: trunk/reactos/dll/win32/oleaut32/vartype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/vartype…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/vartype.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/vartype.c [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -3503,7 +3503,7 @@ */ HRESULT WINAPI VarCyFromR8(double dblIn, CY* pCyOut) { -#if defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) /* This code gives identical results to Win32 on Intel. * Here we use fp exceptions to catch overflows when storing the value. */ Modified: trunk/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winbase.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winbase.h [iso-8859-1] Tue Apr 20 19:36:44 2010 @@ -2301,6 +2301,9 @@ VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE); #endif BOOL WINAPI WinLoadTrustProvider(GUID*); +BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*); +BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN); +BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID); BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED); BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
14 years, 8 months
1
0
0
0
[fireball] 46958: - Sync msimtf, msvfw32, msvidc32, msxml3 to Wine-1.1.43.
by fireball@svn.reactos.org
Author: fireball Date: Tue Apr 20 19:24:00 2010 New Revision: 46958 URL:
http://svn.reactos.org/svn/reactos?rev=46958&view=rev
Log: - Sync msimtf, msvfw32, msvidc32, msxml3 to Wine-1.1.43. Removed: trunk/reactos/dll/win32/msvfw32/msvfw32_ros.diff trunk/reactos/dll/win32/msvfw32/msvideo16.c trunk/reactos/dll/win32/msvfw32/vfw16.h Modified: trunk/reactos/dll/win32/msimtf/activeimmapp.c trunk/reactos/dll/win32/msvfw32/mciwnd.c trunk/reactos/dll/win32/msvidc32/msvideo1.c trunk/reactos/dll/win32/msxml3/dispex.c trunk/reactos/dll/win32/msxml3/element.c trunk/reactos/dll/win32/msxml3/main.c trunk/reactos/dll/win32/msxml3/node.c Modified: trunk/reactos/dll/win32/msimtf/activeimmapp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msimtf/activeimm…
============================================================================== --- trunk/reactos/dll/win32/msimtf/activeimmapp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msimtf/activeimmapp.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -655,7 +655,7 @@ static HRESULT WINAPI ActiveIMMApp_OnDefWindowProc(IActiveIMMApp* This, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) { - //FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam); + FIXME("Stub (%p %x %lx %lx)\n",hWnd,Msg,wParam,lParam); return E_FAIL; } Modified: trunk/reactos/dll/win32/msvfw32/mciwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvfw32/mciwnd.c…
============================================================================== --- trunk/reactos/dll/win32/msvfw32/mciwnd.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvfw32/mciwnd.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -1298,30 +1298,23 @@ } case MCI_SEEK: - { - MCI_SEEK_PARMS mci_seek; - - switch (lParam) - { - case MCIWND_START: - lParam = SendMessageW(hWnd, MCIWNDM_GETSTART, 0, 0); - break; - - case MCIWND_END: - lParam = SendMessageW(hWnd, MCIWNDM_GETEND, 0, 0); - break; - } + case MCI_STEP: + { + MCI_SEEK_PARMS mci_seek; /* Layout is usable as MCI_XYZ_STEP_PARMS */ + DWORD flags = MCI_STEP == wMsg ? 0 : + MCIWND_START == lParam ? MCI_SEEK_TO_START : + MCIWND_END == lParam ? MCI_SEEK_TO_END : MCI_TO; mci_seek.dwTo = lParam; - mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SEEK, - MCI_TO, (DWORD_PTR)&mci_seek); + mwi->lasterror = mciSendCommandW(mwi->mci, wMsg, + flags, (DWORD_PTR)&mci_seek); if (mwi->lasterror) { MCIWND_notify_error(mwi); return mwi->lasterror; } /* update window to reflect the state */ - InvalidateRect(hWnd, NULL, TRUE); + else InvalidateRect(hWnd, NULL, TRUE); return 0; } @@ -1364,15 +1357,9 @@ } case MCI_PAUSE: - case MCI_STEP: case MCI_STOP: case MCI_RESUME: mci_generic_command(mwi, wMsg); - if (wMsg == MCI_STEP && !mwi->lasterror) - { - /* update window to reflect the state */ - InvalidateRect(hWnd, NULL, TRUE); - } return mwi->lasterror; case MCI_CONFIGURE: Removed: trunk/reactos/dll/win32/msvfw32/msvfw32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvfw32/msvfw32_…
============================================================================== --- trunk/reactos/dll/win32/msvfw32/msvfw32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvfw32/msvfw32_ros.diff (removed) @@ -1,14 +1,0 @@ -Index: msvideo_private.h -=================================================================== ---- msvideo_private.h (revision 25690) -+++ msvideo_private.h (working copy) -@@ -19,6 +19,9 @@ - #ifndef __WINE_MSVIDEO_PRIVATE_H - #define __WINE_MSVIDEO_PRIVATE_H - -+/* Installable Compressor Manager */ -+#define ICVERSION 0x0104 -+ - #define ICM_CHOOSE_COMPRESSOR 1 - #define IDC_COMP_LIST 880 - #define IDS_FULLFRAMES 901 Removed: trunk/reactos/dll/win32/msvfw32/msvideo16.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvfw32/msvideo1…
============================================================================== --- trunk/reactos/dll/win32/msvfw32/msvideo16.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvfw32/msvideo16.c (removed) @@ -1,916 +1,0 @@ -/* - * msvideo 16-bit functions - * - * Copyright 1998 Marcus Meissner - * Copyright 2000 Bradley Baetz - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <stdarg.h> -#include <stdio.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "winver.h" -#include "winnls.h" -#include "winreg.h" -#include "winuser.h" -#include "vfw16.h" -#include "msvideo_private.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(msvideo); - -/* Drivers32 settings */ -#define HKLM_DRIVERS32 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32" - -/*********************************************************************** - * DrawDibOpen [MSVIDEO.102] - */ -HDRAWDIB16 VFWAPI DrawDibOpen16(void) -{ - return HDRAWDIB_16(DrawDibOpen()); -} - -/*********************************************************************** - * DrawDibClose [MSVIDEO.103] - */ -BOOL16 VFWAPI DrawDibClose16(HDRAWDIB16 hdd) -{ - return DrawDibClose(HDRAWDIB_32(hdd)); -} - -/************************************************************************ - * DrawDibBegin [MSVIDEO.104] - */ -BOOL16 VFWAPI DrawDibBegin16(HDRAWDIB16 hdd, HDC16 hdc, INT16 dxDst, - INT16 dyDst, LPBITMAPINFOHEADER lpbi, INT16 dxSrc, - INT16 dySrc, UINT16 wFlags) -{ - return DrawDibBegin(HDRAWDIB_32(hdd), HDC_32(hdc), dxDst, dyDst, lpbi, - dxSrc, dySrc, wFlags); -} - -/*********************************************************************** - * DrawDibEnd [MSVIDEO.105] - */ -BOOL16 VFWAPI DrawDibEnd16(HDRAWDIB16 hdd) -{ - return DrawDibEnd(HDRAWDIB_32(hdd)); -} - -/********************************************************************** - * DrawDibDraw [MSVIDEO.106] - */ -BOOL16 VFWAPI DrawDibDraw16(HDRAWDIB16 hdd, HDC16 hdc, INT16 xDst, INT16 yDst, - INT16 dxDst, INT16 dyDst, LPBITMAPINFOHEADER lpbi, - LPVOID lpBits, INT16 xSrc, INT16 ySrc, INT16 dxSrc, - INT16 dySrc, UINT16 wFlags) -{ - return DrawDibDraw(HDRAWDIB_32(hdd), HDC_32(hdc), xDst, yDst, dxDst, - dyDst, lpbi, lpBits, xSrc, ySrc, dxSrc, dySrc, wFlags); -} - -/*********************************************************************** - * DrawDibGetPalette [MSVIDEO.108] - */ -HPALETTE16 VFWAPI DrawDibGetPalette16(HDRAWDIB16 hdd) -{ - return HPALETTE_16(DrawDibGetPalette(HDRAWDIB_32(hdd))); -} - -/*********************************************************************** - * DrawDibSetPalette [MSVIDEO.110] - */ -BOOL16 VFWAPI DrawDibSetPalette16(HDRAWDIB16 hdd, HPALETTE16 hpal) -{ - return DrawDibSetPalette(HDRAWDIB_32(hdd), HPALETTE_32(hpal)); -} - -/*********************************************************************** - * DrawDibRealize [MSVIDEO.112] - */ -UINT16 VFWAPI DrawDibRealize16(HDRAWDIB16 hdd, HDC16 hdc, - BOOL16 fBackground) -{ - return (UINT16)DrawDibRealize(HDRAWDIB_32(hdd), HDC_32(hdc), fBackground); -} - -/************************************************************************* - * DrawDibStart [MSVIDEO.118] - */ -BOOL16 VFWAPI DrawDibStart16(HDRAWDIB16 hdd, DWORD rate) -{ - return DrawDibStart(HDRAWDIB_32(hdd), rate); -} - -/************************************************************************* - * DrawDibStop [MSVIDEO.119] - */ -BOOL16 VFWAPI DrawDibStop16(HDRAWDIB16 hdd) -{ - return DrawDibStop(HDRAWDIB_32(hdd)); -} - -/*********************************************************************** - * ICOpen [MSVIDEO.203] - */ -HIC16 VFWAPI ICOpen16(DWORD fccType, DWORD fccHandler, UINT16 wMode) -{ - return HIC_16(ICOpen(fccType, fccHandler, wMode)); -} - -/*********************************************************************** - * ICClose [MSVIDEO.204] - */ -LRESULT WINAPI ICClose16(HIC16 hic) -{ - return ICClose(HIC_32(hic)); -} - -/*********************************************************************** - * _ICMessage [MSVIDEO.207] - */ -LRESULT VFWAPIV ICMessage16( HIC16 hic, UINT16 msg, UINT16 cb, VA_LIST16 valist ) -{ - LPWORD lpData; - SEGPTR segData; - LRESULT ret; - UINT16 i; - - lpData = HeapAlloc(GetProcessHeap(), 0, cb); - - TRACE("0x%08x, %u, %u, ...)\n", (DWORD) hic, msg, cb); - - for (i = 0; i < cb / sizeof(WORD); i++) - { - lpData[i] = VA_ARG16(valist, WORD); - } - - segData = MapLS(lpData); - ret = ICSendMessage16(hic, msg, segData, (DWORD) cb); - UnMapLS(segData); - HeapFree(GetProcessHeap(), 0, lpData); - return ret; -} - -/*********************************************************************** - * ICGetInfo [MSVIDEO.212] - */ -LRESULT VFWAPI ICGetInfo16(HIC16 hic, ICINFO16 * picinfo, DWORD cb) -{ - LRESULT ret; - - TRACE("(0x%08x,%p,%d)\n", (DWORD) hic, picinfo, cb); - ret = ICSendMessage16(hic, ICM_GETINFO, (DWORD) picinfo, cb); - TRACE(" -> 0x%08lx\n", ret); - return ret; -} - -/*********************************************************************** - * ICLocate [MSVIDEO.213] - */ -HIC16 VFWAPI ICLocate16(DWORD fccType, DWORD fccHandler, - LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, - WORD wFlags) -{ - return HIC_16(ICLocate(fccType, fccHandler, lpbiIn, lpbiOut, wFlags)); -} - -/*********************************************************************** - * _ICCompress [MSVIDEO.224] - */ -DWORD VFWAPIV ICCompress16(HIC16 hic, DWORD dwFlags, - LPBITMAPINFOHEADER lpbiOutput, LPVOID lpData, - LPBITMAPINFOHEADER lpbiInput, LPVOID lpBits, - LPDWORD lpckid, LPDWORD lpdwFlags, - LONG lFrameNum, DWORD dwFrameSize, - DWORD dwQuality, LPBITMAPINFOHEADER lpbiPrev, - LPVOID lpPrev) -{ - DWORD ret; - ICCOMPRESS iccmp; - SEGPTR seg_iccmp; - - TRACE("(0x%08x,%d,%p,%p,%p,%p,...)\n", (DWORD) hic, dwFlags, - lpbiOutput, lpData, lpbiInput, lpBits); - - iccmp.dwFlags = dwFlags; - - iccmp.lpbiOutput = lpbiOutput; - iccmp.lpOutput = lpData; - iccmp.lpbiInput = lpbiInput; - iccmp.lpInput = lpBits; - - iccmp.lpckid = lpckid; - iccmp.lpdwFlags = lpdwFlags; - iccmp.lFrameNum = lFrameNum; - iccmp.dwFrameSize = dwFrameSize; - iccmp.dwQuality = dwQuality; - iccmp.lpbiPrev = lpbiPrev; - iccmp.lpPrev = lpPrev; - seg_iccmp = MapLS(&iccmp); - ret = ICSendMessage16(hic, ICM_COMPRESS, seg_iccmp, sizeof(ICCOMPRESS)); - UnMapLS(seg_iccmp); - return ret; -} - -/*********************************************************************** - * _ICDecompress [MSVIDEO.230] - */ -DWORD VFWAPIV ICDecompress16(HIC16 hic, DWORD dwFlags, - LPBITMAPINFOHEADER lpbiFormat, LPVOID lpData, - LPBITMAPINFOHEADER lpbi, LPVOID lpBits) -{ - ICDECOMPRESS icd; - SEGPTR segptr; - DWORD ret; - - TRACE("(0x%08x,%d,%p,%p,%p,%p)\n", (DWORD) hic, dwFlags, lpbiFormat, - lpData, lpbi, lpBits); - - icd.dwFlags = dwFlags; - icd.lpbiInput = lpbiFormat; - icd.lpInput = lpData; - icd.lpbiOutput = lpbi; - icd.lpOutput = lpBits; - icd.ckid = 0; - segptr = MapLS(&icd); - ret = ICSendMessage16(hic, ICM_DECOMPRESS, segptr, sizeof(ICDECOMPRESS)); - UnMapLS(segptr); - return ret; -} - -/*********************************************************************** - * _ICDrawBegin [MSVIDEO.232] - */ -DWORD VFWAPIV ICDrawBegin16(HIC16 hic, /* [in] */ - DWORD dwFlags, /* [in] flags */ - HPALETTE16 hpal, /* [in] palette to draw with */ - HWND16 hwnd, /* [in] window to draw to */ - HDC16 hdc, /* [in] HDC to draw to */ - INT16 xDst, /* [in] destination rectangle */ - INT16 yDst, /* [in] */ - INT16 dxDst, /* [in] */ - INT16 dyDst, /* [in] */ - LPBITMAPINFOHEADER lpbi, /* [in] format of frame to draw NOTE: SEGPTR */ - INT16 xSrc, /* [in] source rectangle */ - INT16 ySrc, /* [in] */ - INT16 dxSrc, /* [in] */ - INT16 dySrc, /* [in] */ - DWORD dwRate, /* [in] frames/second = (dwRate/dwScale) */ - DWORD dwScale) /* [in] */ -{ - DWORD ret; - ICDRAWBEGIN16 icdb; - SEGPTR seg_icdb; - - TRACE ("(0x%08x,%d,0x%08x,0x%08x,0x%08x,%u,%u,%u,%u,%p,%u,%u,%u,%u,%d,%d)\n", - (DWORD) hic, dwFlags, (DWORD) hpal, (DWORD) hwnd, (DWORD) hdc, - xDst, yDst, dxDst, dyDst, lpbi, xSrc, ySrc, dxSrc, dySrc, dwRate, - dwScale); - - icdb.dwFlags = dwFlags; - icdb.hpal = hpal; - icdb.hwnd = hwnd; - icdb.hdc = hdc; - icdb.xDst = xDst; - icdb.yDst = yDst; - icdb.dxDst = dxDst; - icdb.dyDst = dyDst; - icdb.lpbi = lpbi; /* Keep this as SEGPTR for the mapping code to deal with */ - icdb.xSrc = xSrc; - icdb.ySrc = ySrc; - icdb.dxSrc = dxSrc; - icdb.dySrc = dySrc; - icdb.dwRate = dwRate; - icdb.dwScale = dwScale; - seg_icdb = MapLS(&icdb); - ret = (DWORD) ICSendMessage16(hic, ICM_DRAW_BEGIN, seg_icdb, - sizeof(ICDRAWBEGIN16)); - UnMapLS(seg_icdb); - return ret; -} - -/*********************************************************************** - * _ICDraw [MSVIDEO.234] - */ -DWORD VFWAPIV ICDraw16(HIC16 hic, DWORD dwFlags, - LPVOID lpFormat, /* [???] NOTE: SEGPTR */ - LPVOID lpData, /* [???] NOTE: SEGPTR */ - DWORD cbData, LONG lTime) -{ - DWORD ret; - ICDRAW icd; - SEGPTR seg_icd; - - TRACE("(0x%08x,0x%08x,%p,%p,%d,%d)\n", (DWORD) hic, dwFlags, - lpFormat, lpData, cbData, lTime); - icd.dwFlags = dwFlags; - icd.lpFormat = lpFormat; - icd.lpData = lpData; - icd.cbData = cbData; - icd.lTime = lTime; - seg_icd = MapLS(&icd); - ret = ICSendMessage16(hic, ICM_DRAW, seg_icd, sizeof(ICDRAW)); - UnMapLS(seg_icd); - return ret; -} - -/*********************************************************************** - * ICGetDisplayFormat [MSVIDEO.239] - */ -HIC16 VFWAPI ICGetDisplayFormat16(HIC16 hic, LPBITMAPINFOHEADER lpbiIn, - LPBITMAPINFOHEADER lpbiOut, INT16 depth, - INT16 dx, INT16 dy) -{ - return HIC_16(ICGetDisplayFormat(HIC_32(hic), lpbiIn, lpbiOut, depth, - dx, dy)); -} - -#define COPY(x,y) (x->y = x##16->y); -#define COPYPTR(x,y) (x->y = MapSL((SEGPTR)x##16->y)); - -/****************************************************************** - * MSVIDEO_MapICDEX16To32 - * - * - */ -static LPVOID MSVIDEO_MapICDEX16To32(LPDWORD lParam) -{ - LPVOID ret; - - ICDECOMPRESSEX *icdx = HeapAlloc(GetProcessHeap(), 0, sizeof(ICDECOMPRESSEX)); - ICDECOMPRESSEX16 *icdx16 = MapSL(*lParam); - ret = icdx16; - - COPY(icdx, dwFlags); - COPYPTR(icdx, lpbiSrc); - COPYPTR(icdx, lpSrc); - COPYPTR(icdx, lpbiDst); - COPYPTR(icdx, lpDst); - COPY(icdx, xDst); - COPY(icdx, yDst); - COPY(icdx, dxDst); - COPY(icdx, dyDst); - COPY(icdx, xSrc); - COPY(icdx, ySrc); - COPY(icdx, dxSrc); - COPY(icdx, dySrc); - - *lParam = (DWORD)(icdx); - return ret; -} - -/****************************************************************** - * MSVIDEO_MapMsg16To32 - * - * - */ -static LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) -{ - LPVOID ret = 0; - - TRACE("Mapping %d\n", msg); - - switch (msg) - { - case DRV_LOAD: - case DRV_ENABLE: - case DRV_CLOSE: - case DRV_DISABLE: - case DRV_FREE: - case ICM_ABOUT: - case ICM_CONFIGURE: - case ICM_COMPRESS_END: - case ICM_DECOMPRESS_END: - case ICM_DECOMPRESSEX_END: - case ICM_SETQUALITY: - case ICM_DRAW_START_PLAY: - case ICM_DRAW_STOP_PLAY: - case ICM_DRAW_REALIZE: - case ICM_DRAW_RENDERBUFFER: - case ICM_DRAW_END: - break; - case DRV_OPEN: - case ICM_GETDEFAULTQUALITY: - case ICM_GETQUALITY: - case ICM_SETSTATE: - case ICM_DRAW_WINDOW: - case ICM_GETBUFFERSWANTED: - *lParam1 = (DWORD)MapSL(*lParam1); - break; - case ICM_GETINFO: - { - ICINFO *ici = HeapAlloc(GetProcessHeap(), 0, sizeof(ICINFO)); - ICINFO16 *ici16; - - ici16 = MapSL(*lParam1); - ret = ici16; - - ici->dwSize = sizeof(ICINFO); - COPY(ici, fccType); - COPY(ici, fccHandler); - COPY(ici, dwFlags); - COPY(ici, dwVersion); - COPY(ici, dwVersionICM); - MultiByteToWideChar( CP_ACP, 0, ici16->szName, -1, ici->szName, 16 ); - MultiByteToWideChar( CP_ACP, 0, ici16->szDescription, -1, ici->szDescription, 128 ); - MultiByteToWideChar( CP_ACP, 0, ici16->szDriver, -1, ici->szDriver, 128 ); - *lParam1 = (DWORD)(ici); - *lParam2 = sizeof(ICINFO); - } - break; - case ICM_COMPRESS: - { - ICCOMPRESS *icc = HeapAlloc(GetProcessHeap(), 0, sizeof(ICCOMPRESS)); - ICCOMPRESS *icc16; - - icc16 = MapSL(*lParam1); - ret = icc16; - - COPY(icc, dwFlags); - COPYPTR(icc, lpbiOutput); - COPYPTR(icc, lpOutput); - COPYPTR(icc, lpbiInput); - COPYPTR(icc, lpInput); - COPYPTR(icc, lpckid); - COPYPTR(icc, lpdwFlags); - COPY(icc, lFrameNum); - COPY(icc, dwFrameSize); - COPY(icc, dwQuality); - COPYPTR(icc, lpbiPrev); - COPYPTR(icc, lpPrev); - - *lParam1 = (DWORD)(icc); - *lParam2 = sizeof(ICCOMPRESS); - } - break; - case ICM_DECOMPRESS: - { - ICDECOMPRESS *icd = HeapAlloc(GetProcessHeap(), 0, sizeof(ICDECOMPRESS)); - ICDECOMPRESS *icd16; /* Same structure except for the pointers */ - - icd16 = MapSL(*lParam1); - ret = icd16; - - COPY(icd, dwFlags); - COPYPTR(icd, lpbiInput); - COPYPTR(icd, lpInput); - COPYPTR(icd, lpbiOutput); - COPYPTR(icd, lpOutput); - COPY(icd, ckid); - - *lParam1 = (DWORD)(icd); - *lParam2 = sizeof(ICDECOMPRESS); - } - break; - case ICM_COMPRESS_BEGIN: - case ICM_COMPRESS_GET_FORMAT: - case ICM_COMPRESS_GET_SIZE: - case ICM_COMPRESS_QUERY: - case ICM_DECOMPRESS_GET_FORMAT: - case ICM_DECOMPRESS_QUERY: - case ICM_DECOMPRESS_BEGIN: - case ICM_DECOMPRESS_SET_PALETTE: - case ICM_DECOMPRESS_GET_PALETTE: - *lParam1 = (DWORD)MapSL(*lParam1); - *lParam2 = (DWORD)MapSL(*lParam2); - break; - case ICM_DECOMPRESSEX_QUERY: - if ((*lParam2 != sizeof(ICDECOMPRESSEX16)) && (*lParam2 != 0)) - WARN("*lParam2 has unknown value %p\n", (ICDECOMPRESSEX16*)*lParam2); - /* FIXME: *lParm2 is meant to be 0 or an ICDECOMPRESSEX16*, but is sizeof(ICDECOMRPESSEX16) - * This is because of ICMessage(). Special case it? - { - LPVOID* addr = HeapAlloc(GetProcessHeap(), 0, 2*sizeof(LPVOID)); - addr[0] = MSVIDEO_MapICDEX16To32(lParam1); - if (*lParam2) - addr[1] = MSVIDEO_MapICDEX16To32(lParam2); - else - addr[1] = 0; - - ret = addr; - } - break;*/ - case ICM_DECOMPRESSEX_BEGIN: - case ICM_DECOMPRESSEX: - ret = MSVIDEO_MapICDEX16To32(lParam1); - *lParam2 = sizeof(ICDECOMPRESSEX); - break; - case ICM_DRAW_BEGIN: - { - ICDRAWBEGIN *icdb = HeapAlloc(GetProcessHeap(), 0, sizeof(ICDRAWBEGIN)); - ICDRAWBEGIN16 *icdb16 = MapSL(*lParam1); - ret = icdb16; - - COPY(icdb, dwFlags); - icdb->hpal = HPALETTE_32(icdb16->hpal); - icdb->hwnd = HWND_32(icdb16->hwnd); - icdb->hdc = HDC_32(icdb16->hdc); - COPY(icdb, xDst); - COPY(icdb, yDst); - COPY(icdb, dxDst); - COPY(icdb, dyDst); - COPYPTR(icdb, lpbi); - COPY(icdb, xSrc); - COPY(icdb, ySrc); - COPY(icdb, dxSrc); - COPY(icdb, dySrc); - COPY(icdb, dwRate); - COPY(icdb, dwScale); - - *lParam1 = (DWORD)(icdb); - *lParam2 = sizeof(ICDRAWBEGIN); - } - break; - case ICM_DRAW_SUGGESTFORMAT: - { - ICDRAWSUGGEST *icds = HeapAlloc(GetProcessHeap(), 0, sizeof(ICDRAWSUGGEST)); - ICDRAWSUGGEST16 *icds16 = MapSL(*lParam1); - - ret = icds16; - - COPY(icds, dwFlags); - COPYPTR(icds, lpbiIn); - COPYPTR(icds, lpbiSuggest); - COPY(icds, dxSrc); - COPY(icds, dySrc); - COPY(icds, dxDst); - COPY(icds, dyDst); - icds->hicDecompressor = HIC_32(icds16->hicDecompressor); - - *lParam1 = (DWORD)(icds); - *lParam2 = sizeof(ICDRAWSUGGEST); - } - break; - case ICM_DRAW: - { - ICDRAW *icd = HeapAlloc(GetProcessHeap(), 0, sizeof(ICDRAW)); - ICDRAW *icd16 = MapSL(*lParam1); - ret = icd16; - - COPY(icd, dwFlags); - COPYPTR(icd, lpFormat); - COPYPTR(icd, lpData); - COPY(icd, cbData); - COPY(icd, lTime); - - *lParam1 = (DWORD)(icd); - *lParam2 = sizeof(ICDRAW); - } - break; - case ICM_DRAW_START: - case ICM_DRAW_STOP: - break; - default: - FIXME("%d is not yet handled. Expect a crash.\n", msg); - } - return ret; -} - -#undef COPY -#undef COPYPTR - -/****************************************************************** - * MSVIDEO_UnmapMsg16To32 - * - * - */ -static void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID data16, LPDWORD lParam1, LPDWORD lParam2) -{ - TRACE("Unmapping %d\n", msg); - -#define UNCOPY(x, y) (x##16->y = x->y); - - switch (msg) - { - case ICM_GETINFO: - { - ICINFO *ici = (ICINFO*)(*lParam1); - ICINFO16 *ici16 = data16; - - UNCOPY(ici, fccType); - UNCOPY(ici, fccHandler); - UNCOPY(ici, dwFlags); - UNCOPY(ici, dwVersion); - UNCOPY(ici, dwVersionICM); - WideCharToMultiByte( CP_ACP, 0, ici->szName, -1, ici16->szName, - sizeof(ici16->szName), NULL, NULL ); - ici16->szName[sizeof(ici16->szName)-1] = 0; - WideCharToMultiByte( CP_ACP, 0, ici->szDescription, -1, ici16->szDescription, - sizeof(ici16->szDescription), NULL, NULL ); - ici16->szDescription[sizeof(ici16->szDescription)-1] = 0; - /* This just gives garbage for some reason - BB - lstrcpynWtoA(ici16->szDriver, ici->szDriver, 128);*/ - - HeapFree(GetProcessHeap(), 0, ici); - } - break; - case ICM_DECOMPRESS_QUERY: - /*{ - LPVOID* x = data16; - HeapFree(GetProcessHeap(), 0, x[0]); - if (x[1]) - HeapFree(GetProcessHeap(), 0, x[1]); - } - break;*/ - case ICM_COMPRESS: - case ICM_DECOMPRESS: - case ICM_DECOMPRESSEX_QUERY: - case ICM_DECOMPRESSEX_BEGIN: - case ICM_DECOMPRESSEX: - case ICM_DRAW_BEGIN: - case ICM_DRAW_SUGGESTFORMAT: - case ICM_DRAW: - HeapFree(GetProcessHeap(), 0, data16); - break; - default: - ERR("Unmapping unmapped msg %d\n", msg); - } -#undef UNCOPY -} - -/*********************************************************************** - * ICInfo [MSVIDEO.200] - */ -BOOL16 VFWAPI ICInfo16(DWORD fccType, DWORD fccHandler, ICINFO16 *lpicinfo) -{ - BOOL16 ret; - LPVOID lpv; - DWORD lParam = (DWORD)lpicinfo; - DWORD size = ((ICINFO*)(MapSL((SEGPTR)lpicinfo)))->dwSize; - - /* Use the mapping functions to map the ICINFO structure */ - lpv = MSVIDEO_MapMsg16To32(ICM_GETINFO, &lParam, &size); - - ret = ICInfo(fccType, fccHandler, (ICINFO*)lParam); - - MSVIDEO_UnmapMsg16To32(ICM_GETINFO, lpv, &lParam, &size); - - return ret; -} - -/****************************************************************** - * IC_Callback3216 - * - * - */ -static LRESULT CALLBACK IC_Callback3216(HIC hic, HDRVR hdrv, UINT msg, DWORD lp1, DWORD lp2) -{ - WINE_HIC* whic; - WORD args[8]; - - whic = MSVIDEO_GetHicPtr(hic); - if (whic) - { - DWORD ret = 0; - switch (msg) - { - case DRV_OPEN: - lp2 = (DWORD)MapLS((void*)lp2); - break; - } - args[7] = HIWORD(hic); - args[6] = LOWORD(hic); - args[5] = HDRVR_16(whic->hdrv); - args[4] = msg; - args[3] = HIWORD(lp1); - args[2] = LOWORD(lp1); - args[1] = HIWORD(lp2); - args[0] = LOWORD(lp2); - WOWCallback16Ex( whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &ret ); - - switch (msg) - { - case DRV_OPEN: - UnMapLS(lp2); - break; - } - return ret; - } - else return ICERR_BADHANDLE; -} - -/*********************************************************************** - * ICOpenFunction [MSVIDEO.206] - */ -HIC16 VFWAPI ICOpenFunction16(DWORD fccType, DWORD fccHandler, UINT16 wMode, FARPROC16 lpfnHandler) -{ - HIC hic32; - - hic32 = MSVIDEO_OpenFunction(fccType, fccHandler, wMode, - (DRIVERPROC)IC_Callback3216, (DWORD)lpfnHandler); - return HIC_16(hic32); -} - -/*********************************************************************** - * ICSendMessage [MSVIDEO.205] - */ -LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2) -{ - LRESULT ret = ICERR_BADHANDLE; - WINE_HIC* whic; - - whic = MSVIDEO_GetHicPtr(HIC_32(hic)); - if (whic) - { - /* we've got a 16 bit driver proc... call it directly */ - if (whic->driverproc16) - { - WORD args[8]; - DWORD result; - - /* FIXME: original code was passing hdrv first and hic second */ - /* but this doesn't match what IC_Callback3216 does */ - args[7] = HIWORD(hic); - args[6] = LOWORD(hic); - args[5] = HDRVR_16(whic->hdrv); - args[4] = msg; - args[3] = HIWORD(lParam1); - args[2] = LOWORD(lParam1); - args[1] = HIWORD(lParam2); - args[0] = LOWORD(lParam2); - WOWCallback16Ex( whic->driverproc16, WCB16_PASCAL, sizeof(args), args, &result ); - ret = result; - } - else - { - /* map the message for a 32 bit infrastructure, and pass it along */ - void* data16 = MSVIDEO_MapMsg16To32(msg, &lParam1, &lParam2); - - ret = MSVIDEO_SendMessage(whic, msg, lParam1, lParam2); - if (data16) - MSVIDEO_UnmapMsg16To32(msg, data16, &lParam1, &lParam2); - } - } - return ret; -} - -/*********************************************************************** - * VideoCapDriverDescAndVer [MSVIDEO.22] - */ -DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len, - LPSTR buf2, WORD buf2len) -{ - static const char version_info_spec[] = "\\StringFileInfo\\040904E4\\FileDescription"; - DWORD verhandle; - DWORD infosize; - UINT subblocklen; - char *s, buf[2048], fn[260]; - LPBYTE infobuf; - LPVOID subblock; - DWORD i, cnt = 0, lRet; - DWORD bufLen, fnLen; - FILETIME lastWrite; - HKEY hKey; - BOOL found = FALSE; - - TRACE("(%d,%p,%d,%p,%d)\n", nr, buf1, buf1len, buf2, buf2len); - lRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE, HKLM_DRIVERS32, 0, KEY_QUERY_VALUE, &hKey); - if (lRet == ERROR_SUCCESS) - { - RegQueryInfoKeyA( hKey, 0, 0, 0, &cnt, 0, 0, 0, 0, 0, 0, 0); - for (i = 0; i < cnt; i++) - { - bufLen = sizeof(buf) / sizeof(buf[0]); - lRet = RegEnumKeyExA(hKey, i, buf, &bufLen, 0, 0, 0, &lastWrite); - if (lRet != ERROR_SUCCESS) continue; - if (strncasecmp(buf, "vid", 3)) continue; - if (nr--) continue; - fnLen = sizeof(fn); - lRet = RegQueryValueExA(hKey, buf, 0, 0, (LPBYTE)fn, &fnLen); - if (lRet == ERROR_SUCCESS) found = TRUE; - break; - } - RegCloseKey( hKey ); - } - - /* search system.ini if not found in the registry */ - if (!found && GetPrivateProfileStringA("drivers32", NULL, NULL, buf, sizeof(buf), "system.ini")) - { - for (s = buf; *s; s += strlen(s) + 1) - { - if (strncasecmp(s, "vid", 3)) continue; - if (nr--) continue; - if (GetPrivateProfileStringA("drivers32", s, NULL, fn, sizeof(fn), "system.ini")) - found = TRUE; - break; - } - } - - if (!found) - { - TRACE("No more VID* entries found nr=%d\n", nr); - return 20; - } - infosize = GetFileVersionInfoSizeA(fn, &verhandle); - if (!infosize) - { - TRACE("%s has no fileversioninfo.\n", fn); - return 18; - } - infobuf = HeapAlloc(GetProcessHeap(), 0, infosize); - if (GetFileVersionInfoA(fn, verhandle, infosize, infobuf)) - { - /* Yes, two space behind : */ - /* FIXME: test for buflen */ - snprintf(buf2, buf2len, "Version: %d.%d.%d.%d\n", - ((WORD*)infobuf)[0x0f], - ((WORD*)infobuf)[0x0e], - ((WORD*)infobuf)[0x11], - ((WORD*)infobuf)[0x10] - ); - TRACE("version of %s is %s\n", fn, buf2); - } - else - { - TRACE("GetFileVersionInfoA failed for %s.\n", fn); - lstrcpynA(buf2, fn, buf2len); /* msvideo.dll appears to copy fn*/ - } - /* FIXME: language problem? */ - if (VerQueryValueA( infobuf, - version_info_spec, - &subblock, - &subblocklen - )) - { - UINT copylen = min(subblocklen,buf1len-1); - memcpy(buf1, subblock, copylen); - buf1[copylen] = '\0'; - TRACE("VQA returned %s\n", (LPCSTR)subblock); - } - else - { - TRACE("VQA did not return on query \\StringFileInfo\\040904E4\\FileDescription?\n"); - lstrcpynA(buf1, fn, buf1len); /* msvideo.dll appears to copy fn*/ - } - HeapFree(GetProcessHeap(), 0, infobuf); - return 0; -} - -/****************************************************************** - * IC_CallTo16 - * - * - */ -static LRESULT CALLBACK IC_CallTo16(HDRVR hdrv, HIC hic, UINT msg, LPARAM lp1, LPARAM lp2) -{ -#if 0 - WINE_HIC* whic = IC_GetPtr(hic); - LRESULT ret = 0; - - - if (whic->driverproc) - { - ret = whic->driverproc(hic, whic->hdrv, msg, lParam1, lParam2); - } - else - { - ret = SendDriverMessage(whic->hdrv, msg, lParam1, lParam2); - } -#else - FIXME("No 32=>16 conversion yet\n"); -#endif - return 0; -} - -/************************************************************************** - * DllEntryPoint (MSVIDEO.3) - * - * MSVIDEO DLL entry point - * - */ -BOOL WINAPI VIDEO_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds, - WORD wHeapSize, DWORD dwReserved1, WORD wReserved2) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - /* hook in our 16 bit management functions */ - pFnCallTo16 = IC_CallTo16; - break; - case DLL_PROCESS_DETACH: - /* remove our 16 bit management functions */ - pFnCallTo16 = NULL; - break; - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - } - return TRUE; -} Removed: trunk/reactos/dll/win32/msvfw32/vfw16.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvfw32/vfw16.h?…
============================================================================== --- trunk/reactos/dll/win32/msvfw32/vfw16.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvfw32/vfw16.h (removed) @@ -1,130 +1,0 @@ -/* - * Copyright 1999 Marcus Meissner - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __WINE_VFW16_H -#define __WINE_VFW16_H - -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "vfw.h" -#include "wownt32.h" -#include "wine/windef16.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef HANDLE16 HDRAWDIB16; - -#include "pshpack1.h" - -typedef struct { - DWORD dwSize; - DWORD fccType; - DWORD fccHandler; - DWORD dwFlags; - DWORD dwVersion; - DWORD dwVersionICM; - /* - * under Win16, normal chars are used - */ - CHAR szName[16]; - CHAR szDescription[128]; - CHAR szDriver[128]; -} ICINFO16; - -typedef struct { - DWORD dwFlags; - LPBITMAPINFOHEADER lpbiSrc; - LPVOID lpSrc; - LPBITMAPINFOHEADER lpbiDst; - LPVOID lpDst; - - INT16 xDst; /* destination rectangle */ - INT16 yDst; - INT16 dxDst; - INT16 dyDst; - - INT16 xSrc; /* source rectangle */ - INT16 ySrc; - INT16 dxSrc; - INT16 dySrc; -} ICDECOMPRESSEX16; - -typedef struct { - DWORD dwFlags; - HPALETTE16 hpal; - HWND16 hwnd; - HDC16 hdc; - INT16 xDst; - INT16 yDst; - INT16 dxDst; - INT16 dyDst; - LPBITMAPINFOHEADER lpbi; - INT16 xSrc; - INT16 ySrc; - INT16 dxSrc; - INT16 dySrc; - DWORD dwRate; - DWORD dwScale; -} ICDRAWBEGIN16; - -#include "poppack.h" - -typedef struct { - DWORD dwFlags; - LPBITMAPINFOHEADER lpbiIn; - LPBITMAPINFOHEADER lpbiSuggest; - INT16 dxSrc; - INT16 dySrc; - INT16 dxDst; - INT16 dyDst; - HIC16 hicDecompressor; -} ICDRAWSUGGEST16; - -DWORD VFWAPIV ICDraw16(HIC16,DWORD,LPVOID,LPVOID,DWORD,LONG); -DWORD VFWAPIV ICDrawBegin16(HIC16,DWORD,HPALETTE16,HWND16,HDC16,INT16, - INT16,INT16,INT16,LPBITMAPINFOHEADER, - INT16,INT16,INT16,INT16,DWORD,DWORD); -LRESULT WINAPI ICClose16(HIC16); -DWORD VFWAPIV ICCompress16(HIC16,DWORD,LPBITMAPINFOHEADER,LPVOID, - LPBITMAPINFOHEADER,LPVOID,LPDWORD, - LPDWORD,LONG,DWORD,DWORD, - LPBITMAPINFOHEADER,LPVOID); -DWORD VFWAPIV ICDecompress16(HIC16,DWORD,LPBITMAPINFOHEADER,LPVOID, - LPBITMAPINFOHEADER,LPVOID); -HIC16 VFWAPI ICGetDisplayFormat16(HIC16,LPBITMAPINFOHEADER, - LPBITMAPINFOHEADER,INT16,INT16, - INT16); -LRESULT VFWAPI ICGetInfo16(HIC16,ICINFO16 *,DWORD); -BOOL16 VFWAPI ICInfo16(DWORD,DWORD,ICINFO16 *); -HIC16 VFWAPI ICLocate16(DWORD,DWORD,LPBITMAPINFOHEADER, - LPBITMAPINFOHEADER,WORD); -LRESULT VFWAPIV ICMessage16( HIC16 hic, UINT16 msg, UINT16 cb, VA_LIST16 valist ); -HIC16 VFWAPI ICOpen16(DWORD,DWORD,UINT16); -HIC16 VFWAPI ICOpenFunction16(DWORD,DWORD,UINT16,FARPROC16); -LRESULT VFWAPI ICSendMessage16(HIC16,UINT16,DWORD,DWORD); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __WINE_VFW16_H */ Modified: trunk/reactos/dll/win32/msvidc32/msvideo1.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvidc32/msvideo…
============================================================================== --- trunk/reactos/dll/win32/msvidc32/msvideo1.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msvidc32/msvideo1.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -95,10 +95,18 @@ blocks_high = height / 4; total_blocks = blocks_wide * blocks_high; block_inc = 4; +#ifdef ORIGINAL row_dec = stride + 4; +#else + row_dec = - (stride - 4); /* such that -row_dec > 0 */ +#endif for (block_y = blocks_high; block_y > 0; block_y--) { +#ifdef ORIGINAL block_ptr = ((block_y * 4) - 1) * stride; +#else + block_ptr = ((blocks_high - block_y) * 4) * stride; +#endif for (block_x = blocks_wide; block_x > 0; block_x--) { /* check if this block should be skipped */ if (skip_blocks) { @@ -131,16 +139,7 @@ for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1) - { -#ifdef ORIGINAL pixels[pixel_ptr++] = colors[(flags & 0x1) ^ 1]; -#else - pixels[width*(height-(pixel_ptr/width)-1) + - pixel_ptr%width] = - colors[(flags & 0x1) ^ 1]; - pixel_ptr++; -#endif - } pixel_ptr -= row_dec; } } else if (byte_b >= 0x90) { @@ -153,19 +152,9 @@ for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1) - { -#ifdef ORIGINAL - pixels[pixel_ptr++] = - colors[((pixel_y & 0x2) << 1) + + pixels[pixel_ptr++] = + colors[((pixel_y & 0x2) << 1) + (pixel_x & 0x2) + ((flags & 0x1) ^ 1)]; -#else - pixels[width*(height-(pixel_ptr/width)-1) + - pixel_ptr%width] = - colors[((pixel_y & 0x2) << 1) + - (pixel_x & 0x2) + ((flags & 0x1) ^ 1)]; - pixel_ptr++; -#endif - } pixel_ptr -= row_dec; } } else { @@ -174,15 +163,7 @@ for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++) - { -#ifdef ORIGINAL pixels[pixel_ptr++] = colors[0]; -#else - pixels[width*(height-(pixel_ptr/width)-1) + - pixel_ptr%width] = colors[0]; - pixel_ptr++; -#endif - } pixel_ptr -= row_dec; } } @@ -218,10 +199,18 @@ blocks_high = height / 4; total_blocks = blocks_wide * blocks_high; block_inc = 4; +#ifdef ORIGINAL row_dec = stride + 4; +#else + row_dec = - (stride - 4); /* such that -row_dec > 0 */ +#endif for (block_y = blocks_high; block_y > 0; block_y--) { +#ifdef ORIGINAL block_ptr = ((block_y * 4) - 1) * stride; +#else + block_ptr = ((blocks_high - block_y) * 4) * stride; +#endif for (block_x = blocks_wide; block_x > 0; block_x--) { /* check if this block should be skipped */ if (skip_blocks) { @@ -272,8 +261,8 @@ for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1) - pixels[pixel_ptr++] = - colors[((pixel_y & 0x2) << 1) + + pixels[pixel_ptr++] = + colors[((pixel_y & 0x2) << 1) + (pixel_x & 0x2) + ((flags & 0x1) ^ 1)]; pixel_ptr -= row_dec; } @@ -408,7 +397,7 @@ width = icd->lpbiInput->biWidth; height = icd->lpbiInput->biHeight; bit_per_pixel = icd->lpbiInput->biBitCount; - stride = width*bit_per_pixel/8; + stride = width; /* in bytes or 16bit words */ sz = icd->lpbiInput->biSizeImage; if (info->mode_8bit) @@ -440,7 +429,7 @@ width = icd->lpbiSrc->biWidth; height = icd->lpbiSrc->biHeight; bit_per_pixel = icd->lpbiSrc->biBitCount; - stride = width*bit_per_pixel/8; + stride = width; sz = icd->lpbiSrc->biSizeImage; if (info->mode_8bit) @@ -562,6 +551,10 @@ (DWORD) lParam2 ); break; + case ICM_DECOMPRESS_END: + r = ICERR_OK; + break; + case ICM_COMPRESS_QUERY: FIXME("compression not implemented\n"); r = ICERR_BADFORMAT; Modified: trunk/reactos/dll/win32/msxml3/dispex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/dispex.c?…
============================================================================== --- trunk/reactos/dll/win32/msxml3/dispex.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/dispex.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -196,12 +196,12 @@ static int dispid_cmp(const void *p1, const void *p2) { - return ((func_info_t*)p1)->id - ((func_info_t*)p2)->id; + return ((const func_info_t*)p1)->id - ((const func_info_t*)p2)->id; } static int func_name_cmp(const void *p1, const void *p2) { - return strcmpiW((*(func_info_t**)p1)->name, (*(func_info_t**)p2)->name); + return strcmpiW((*(func_info_t* const*)p1)->name, (*(func_info_t* const*)p2)->name); } static dispex_data_t *preprocess_dispex_data(DispatchEx *This) Modified: trunk/reactos/dll/win32/msxml3/element.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
============================================================================== --- trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -594,7 +594,7 @@ IXMLDOMNamedNodeMap *attr; HRESULT hr; - TRACE("(%p)->(%s)", This, debugstr_w(p)); + TRACE("(%p)->(%s)\n", This, debugstr_w(p)); hr = IXMLDOMElement_get_attributes(iface, &attr); if (hr != S_OK) return hr; Modified: trunk/reactos/dll/win32/msxml3/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/main.c?re…
============================================================================== --- trunk/reactos/dll/win32/msxml3/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/main.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -62,7 +62,7 @@ static void *wineXmlOpenCallback (char const * filename) { - BSTR sFilename = bstr_from_xmlChar( (xmlChar*)filename); + BSTR sFilename = bstr_from_xmlChar( (const xmlChar*)filename); HANDLE hFile; TRACE("%s\n", debugstr_w(sFilename)); Modified: trunk/reactos/dll/win32/msxml3/node.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
============================================================================== --- trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] Tue Apr 20 19:24:00 2010 @@ -934,8 +934,9 @@ VARIANT_BOOL* isSpecified) { xmlnode *This = impl_from_IXMLDOMNode( iface ); - FIXME("(%p)->(%p)\n", This, isSpecified); - return E_NOTIMPL; + FIXME("(%p)->(%p) stub!\n", This, isSpecified); + *isSpecified = VARIANT_TRUE; + return S_OK; } static HRESULT WINAPI xmlnode_get_definition( @@ -1190,8 +1191,8 @@ switch ( This->node->type ) { case XML_ELEMENT_NODE: - pVal = xmlGetNsProp(This->node, (xmlChar*)"dt", - (xmlChar*)"urn:schemas-microsoft-com:datatypes"); + pVal = xmlGetNsProp(This->node, (const xmlChar*)"dt", + (const xmlChar*)"urn:schemas-microsoft-com:datatypes"); if (pVal) { V_VT(dataTypeName) = VT_BSTR; @@ -1260,20 +1261,20 @@ xmlAttrPtr pAttr = NULL; xmlChar* str = xmlChar_from_wchar(dataTypeName); - pAttr = xmlHasNsProp(This->node, (xmlChar*)"dt", - (xmlChar*)"urn:schemas-microsoft-com:datatypes"); + pAttr = xmlHasNsProp(This->node, (const xmlChar*)"dt", + (const xmlChar*)"urn:schemas-microsoft-com:datatypes"); if (pAttr) { - pAttr = xmlSetNsProp(This->node, pAttr->ns, (xmlChar*)"dt", str); + pAttr = xmlSetNsProp(This->node, pAttr->ns, (const xmlChar*)"dt", str); hr = S_OK; } else { - pNS = xmlNewNs(This->node, (xmlChar*)"urn:schemas-microsoft-com:datatypes", (xmlChar*)"dt"); + pNS = xmlNewNs(This->node, (const xmlChar*)"urn:schemas-microsoft-com:datatypes", (const xmlChar*)"dt"); if(pNS) { - pAttr = xmlNewNsProp(This->node, pNS, (xmlChar*)"dt", str); + pAttr = xmlNewNsProp(This->node, pNS, (const xmlChar*)"dt", str); if(pAttr) { xmlAddChild(This->node, (xmlNodePtr)pAttr); @@ -1294,8 +1295,6 @@ static BSTR EnsureCorrectEOL(BSTR sInput) { - static const WCHAR SZ_RETURN[] = {'\n',0}; - static const WCHAR SZ_LINEFEED[] = {'\r',0}; int nNum = 0; BSTR sNew; int nLen; @@ -1305,7 +1304,7 @@ /* Count line endings */ for(i=0; i < nLen; i++) { - if(sInput[i] == SZ_RETURN[0]) + if(sInput[i] == '\n') nNum++; } @@ -1318,9 +1317,9 @@ sNew = SysAllocStringLen(NULL, nLen + nNum+1); for(i=0; i < nLen; i++) { - if(sInput[i] == SZ_RETURN[0]) + if(sInput[i] == '\n') { - sNew[i+nPlace] = SZ_LINEFEED[0]; + sNew[i+nPlace] = '\r'; nPlace++; } sNew[i+nPlace] = sInput[i]; @@ -1371,7 +1370,7 @@ /* * We are trying to replicate the same behaviour as msxml by converting - * line endings to \r\n and using idents as \t. The problem is that msxml + * line endings to \r\n and using indents as \t. The problem is that msxml * only formats nodes that have a line ending. Using libxml we cannot * reproduce behaviour exactly. * @@ -1402,7 +1401,7 @@ /* Attribute Nodes return a space in front of their name */ pContent = xmlBufferContent(pXmlBuf); - if( ((char*)pContent)[0] == ' ') + if( ((const char*)pContent)[0] == ' ') bstrContent = bstr_from_xmlChar(pContent+1); else bstrContent = bstr_from_xmlChar(pContent); @@ -1550,8 +1549,9 @@ VARIANT_BOOL* isParsed) { xmlnode *This = impl_from_IXMLDOMNode( iface ); - FIXME("(%p)->(%p)\n", This, isParsed); - return E_NOTIMPL; + FIXME("(%p)->(%p) stub!\n", This, isParsed); + *isParsed = VARIANT_TRUE; + return S_OK; } static HRESULT WINAPI xmlnode_get_namespaceURI(
14 years, 8 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
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