winehq.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
2025
June
May
April
March
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1278 discussions
Start a n
N
ew thread
Roderick Colenbrander : wined3d: Fix a few small bugs in WineD3D_ChoosePixelFormat.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 4428cc32de1f99463ebaa990726c8bd7a3eef6c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4428cc32de1f99463ebaa9907…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Mon Apr 28 21:13:12 2008 +0000 wined3d: Fix a few small bugs in WineD3D_ChoosePixelFormat. --- dlls/wined3d/context.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index f185c33..d80ef06 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -133,6 +133,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF /* Find a pixel format which EXACTLY matches our requirements (except for depth) */ for(i=0; i<nCfgs; i++) { BOOL exactDepthMatch = TRUE; + cfgs = &This->adapter->cfgs[i]; /* For now only accept RGBA formats. Perhaps some day we will * allow floating point formats for pbuffers. */ @@ -194,7 +195,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF if(!iPixelFormat && !findCompatible) { ERR("Can't find a suitable iPixelFormat\n"); return FALSE; - } else { + } else if(!iPixelFormat) { PIXELFORMATDESCRIPTOR pfd; TRACE("Falling back to ChoosePixelFormat as we weren't able to find an exactly matching pixel format\n"); @@ -218,7 +219,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF } } - TRACE("Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s\n", cfgs->iPixelFormat, debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat)); + TRACE("Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s\n", iPixelFormat, debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat)); return iPixelFormat; }
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawCurve2I.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 00cfffbcb3653ecef6a59240b72df5c9b0e25b74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00cfffbcb3653ecef6a59240b…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Apr 29 00:09:44 2008 +0400 gdiplus: Implemented GdipDrawCurve2I. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 2c70823..298c5f7 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -164,7 +164,7 @@ @ stub GdipDrawClosedCurve @ stub GdipDrawClosedCurveI @ stdcall GdipDrawCurve2(ptr ptr ptr long long) -@ stub GdipDrawCurve2I +@ stdcall GdipDrawCurve2I(ptr ptr ptr long long) @ stub GdipDrawCurve3 @ stub GdipDrawCurve3I @ stub GdipDrawCurve diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index b8a2efa..d918d99 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1059,6 +1059,31 @@ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen, return retval; } +GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen, + GDIPCONST GpPoint *points, INT count, REAL tension) +{ + GpPointF *pointsF; + GpStatus ret; + INT i; + + if(!points || count <= 0) + return InvalidParameter; + + pointsF = GdipAlloc(sizeof(GpPointF)*count); + if(!pointsF) + return OutOfMemory; + + for(i = 0; i < count; i++){ + pointsF[i].X = (REAL)points[i].X; + pointsF[i].Y = (REAL)points[i].Y; + } + + ret = GdipDrawCurve2(graphics,pen,pointsF,count,tension); + GdipFree(pointsF); + + return ret; +} + GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y) {
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawCurve/GdipDrawCurveI.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: fe1782eeae53dfc124acb06f85aafc7ddec435cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe1782eeae53dfc124acb06f8…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Apr 29 00:09:55 2008 +0400 gdiplus: Implemented GdipDrawCurve/GdipDrawCurveI. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/graphics.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 298c5f7..d2baa36 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -167,8 +167,8 @@ @ stdcall GdipDrawCurve2I(ptr ptr ptr long long) @ stub GdipDrawCurve3 @ stub GdipDrawCurve3I -@ stub GdipDrawCurve -@ stub GdipDrawCurveI +@ stdcall GdipDrawCurve(ptr ptr ptr long) +@ stdcall GdipDrawCurveI(ptr ptr ptr long) @ stub GdipDrawDriverString @ stub GdipDrawEllipse @ stub GdipDrawEllipseI diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index d918d99..b011ef7 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1006,6 +1006,37 @@ GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, return retval; } +GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen, + GDIPCONST GpPointF *points, INT count) +{ + return GdipDrawCurve2(graphics,pen,points,count,1.0); +} + +GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics *graphics, GpPen *pen, + GDIPCONST GpPoint *points, INT count) +{ + GpPointF *pointsF; + GpStatus ret; + INT i; + + if(!points || count <= 0) + return InvalidParameter; + + pointsF = GdipAlloc(sizeof(GpPointF)*count); + if(!pointsF) + return OutOfMemory; + + for(i = 0; i < count; i++){ + pointsF[i].X = (REAL)points[i].X; + pointsF[i].Y = (REAL)points[i].Y; + } + + ret = GdipDrawCurve(graphics,pen,pointsF,count); + GdipFree(pointsF); + + return ret; +} + /* Approximates cardinal spline with Bezier curves. */ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count, REAL tension)
1
0
0
0
Dmitry Timoshkov : gdi32: info->state.next is always NULL, there is no need to save/restore it.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 5c15cf5f12ee57df0bd67aa4858f990753e2de54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c15cf5f12ee57df0bd67aa48…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Apr 29 14:48:55 2008 +0900 gdi32: info->state.next is always NULL, there is no need to save/restore it. --- dlls/gdi32/enhmetafile.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index 7c6068d..378ac4f 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -557,11 +557,7 @@ static void EMF_RestoreDC( enum_emh_data *info, INT level ) info->saved_state = state->next; state->next = NULL; if (--info->save_level < level) - { - EMF_dc_state *next = info->state.next; info->state = *state; - info->state.next = next; - } HeapFree( GetProcessHeap(), 0, state ); } } @@ -2279,7 +2275,7 @@ BOOL WINAPI EnumEnhMetaFile( return FALSE; } - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + info = HeapAlloc( GetProcessHeap(), 0, sizeof (enum_emh_data) + sizeof(HANDLETABLE) * emh->nHandles ); if(!info) { @@ -2298,6 +2294,7 @@ BOOL WINAPI EnumEnhMetaFile( info->state.world_transform.eM12 = info->state.world_transform.eM21 = 0; info->state.world_transform.eDx = info->state.world_transform.eDy = 0; + info->state.next = NULL; info->save_level = 0; info->saved_state = NULL;
1
0
0
0
Dmitry Timoshkov : gdi32: Make the bitmap test pass under Windows 2000.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 80c1508bf1ed6fdbf450868230a8bb10cb1a537d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80c1508bf1ed6fdbf45086823…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Apr 29 14:49:45 2008 +0900 gdi32: Make the bitmap test pass under Windows 2000. --- dlls/gdi32/tests/bitmap.c | 33 +++++++++++++++++++-------------- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index 00441c0..27a6c88 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -276,7 +276,7 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER { BITMAP bm; DIBSECTION ds; - INT ret, width_bytes; + INT ret, bm_width_bytes, dib_width_bytes; BYTE *buf; ret = GetObject(hbm, sizeof(bm), &bm); @@ -285,23 +285,25 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); ok(bm.bmHeight == bmih->biHeight, "wrong bm.bmHeight %d\n", bm.bmHeight); - width_bytes = DIB_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); - ok(bm.bmWidthBytes == width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, width_bytes); + dib_width_bytes = DIB_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); + bm_width_bytes = BITMAP_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); + if (bm.bmWidthBytes != dib_width_bytes) /* Win2k bug */ + ok(bm.bmWidthBytes == bm_width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, bm_width_bytes); + else + ok(bm.bmWidthBytes == dib_width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, dib_width_bytes); ok(bm.bmPlanes == bmih->biPlanes, "wrong bm.bmPlanes %d\n", bm.bmPlanes); ok(bm.bmBitsPixel == bmih->biBitCount, "bm.bmBitsPixel %d != %d\n", bm.bmBitsPixel, bmih->biBitCount); ok(bm.bmBits == bits, "wrong bm.bmBits %p != %p\n", bm.bmBits, bits); buf = HeapAlloc(GetProcessHeap(), 0, bm.bmWidthBytes * bm.bmHeight + 4096); - width_bytes = BITMAP_GetWidthBytes(bm.bmWidth, bm.bmBitsPixel); - /* GetBitmapBits returns not 32-bit aligned data */ ret = GetBitmapBits(hbm, 0, NULL); - ok(ret == width_bytes * bm.bmHeight, "%d != %d\n", ret, width_bytes * bm.bmHeight); + ok(ret == bm_width_bytes * bm.bmHeight, "%d != %d\n", ret, bm_width_bytes * bm.bmHeight); memset(buf, 0xAA, bm.bmWidthBytes * bm.bmHeight + 4096); ret = GetBitmapBits(hbm, bm.bmWidthBytes * bm.bmHeight + 4096, buf); - ok(ret == width_bytes * bm.bmHeight, "%d != %d\n", ret, width_bytes * bm.bmHeight); + ok(ret == bm_width_bytes * bm.bmHeight, "%d != %d\n", ret, bm_width_bytes * bm.bmHeight); HeapFree(GetProcessHeap(), 0, buf); @@ -331,8 +333,9 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER ok(ret == sizeof(ds), "wrong size %d\n", ret); ok(ds.dsBm.bmBits == bits, "wrong bm.bmBits %p != %p\n", ds.dsBm.bmBits, bits); - ok(ds.dsBmih.biSizeImage == ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight, "%u != %u\n", - ds.dsBmih.biSizeImage, ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight); + if (ds.dsBm.bmWidthBytes != bm_width_bytes) /* Win2k bug */ + ok(ds.dsBmih.biSizeImage == ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight, "%u != %u\n", + ds.dsBmih.biSizeImage, ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight); ok(bmih->biSizeImage == 0, "%u != 0\n", bmih->biSizeImage); ds.dsBmih.biSizeImage = 0; @@ -969,11 +972,6 @@ static void test_bitmap(void) SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff, 1, 1, 1, NULL); - ok(hbmp != 0, "CreateBitmap should not fail\n"); - DeleteObject(hbmp); - - SetLastError(0xdeadbeef); - hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL); if (!hbmp) { ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, @@ -983,6 +981,13 @@ static void test_bitmap(void) DeleteObject(hbmp); SetLastError(0xdeadbeef); + hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL); + ok(!hbmp, "CreateBitmap should fail\n"); + ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY /* XP */ || + GetLastError() == ERROR_INVALID_PARAMETER /* Win2k */, + "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + + SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL); ok(!hbmp, "CreateBitmap should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER,
1
0
0
0
Maarten Lankhorst : quartz: Handle failures better in acmwrapper.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1ba8ece76e1b87f43270edb1324c31b818e8162e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ba8ece76e1b87f43270edb13…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 16:32:57 2008 -0700 quartz: Handle failures better in acmwrapper. --- dlls/quartz/acmwrapper.c | 96 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 81 insertions(+), 15 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index c7b1e42..92d0298 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -48,6 +48,9 @@ typedef struct ACMWrapperImpl LPWAVEFORMATEX pWfIn; LPWAVEFORMATEX pWfOut; + IMediaSample *recv, *xmit; + ULONG done; + LONGLONG lasttime_real; LONGLONG lasttime_sent; } ACMWrapperImpl; @@ -66,32 +69,61 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte HRESULT hr; LONGLONG tStart = -1, tStop = -1, tMed; + assert(pSample); + + if (This->xmit) + { + hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], This->xmit); + if (hr != S_OK) + return hr; + IMediaSample_Release(This->xmit); + This->xmit = NULL; + } + hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) { ERR("Cannot get pointer to sample data (%x)\n", hr); return hr; } - - preroll = (IMediaSample_IsPreroll(pSample) == S_OK); - - IMediaSample_GetTime(pSample, &tStart, &tStop); cbSrcStream = IMediaSample_GetActualDataLength(pSample); + preroll = (IMediaSample_IsPreroll(pSample) == S_OK); - /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ - if (IMediaSample_IsDiscontinuity(pSample) == S_OK) + if (pSample != This->recv) { - This->lasttime_real = tStart; - This->lasttime_sent = tStart; + if (This->recv) + { + /* Get rid of buffered sample first */ + hr = ACMWrapper_ProcessSampleData(pTransformFilter, This->recv); + if (hr != S_OK) + return hr; + if (This->recv) + return S_FALSE; + } + + IMediaSample_GetTime(pSample, &tStart, &tStop); + + /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ + if (IMediaSample_IsDiscontinuity(pSample) == S_OK) + { + This->lasttime_real = tStart; + This->lasttime_sent = tStart; + } + else if (This->lasttime_real == tStart) + tStart = This->lasttime_sent; + else + WARN("Discontinuity\n"); } - else if (This->lasttime_real == tStart) - tStart = This->lasttime_sent; else - WARN("Discontinuity\n"); - + { + tStart = This->lasttime_sent; + tStop = This->lasttime_real; + cbSrcStream -= This->done; + pbSrcStream += This->done; + } tMed = tStart; - TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, (long)cbSrcStream); + TRACE("Sample data ptr = %p, size = %u\n", pbSrcStream, cbSrcStream); hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt); if (FAILED(hr)) { @@ -201,17 +233,44 @@ error: ash.pbSrc += ash.cbSrcLengthUsed; ash.cbSrcLength -= ash.cbSrcLengthUsed; + if (hr == S_FALSE) + { + This->xmit = pOutSample; + if (ash.cbSrcLength && !This->recv) + { + This->recv = pSample; + IMediaSample_AddRef(This->recv); + } + else if (This->recv) + { + IMediaSample_Release(This->recv); + This->recv = NULL; + } + + This->done = IMediaSample_GetActualDataLength(pSample) - ash.cbSrcLength; + break; + } + if (pOutSample) IMediaSample_Release(pOutSample); pOutSample = NULL; - } This->lasttime_real = tStop; This->lasttime_sent = tMed; + if (hr != S_OK) FIXME("FATALITY: %08x\n", hr); + else if (This->recv) + { + assert(This->recv == pSample); + IMediaSample_Release(This->recv); + This->recv = NULL; + } + + if (hr == S_FALSE) + return S_OK; return hr; } @@ -277,7 +336,13 @@ static HRESULT ACMWrapper_Cleanup(TransformFilterImpl* pTransformFilter) This->has = 0; This->lasttime_real = This->lasttime_sent = -1; - + if (This->recv) + IMediaSample_Release(This->recv); + + if (This->xmit) + IMediaSample_Release(This->xmit); + + This->recv = This->xmit = NULL; return S_OK; } @@ -313,6 +378,7 @@ HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv) *ppv = (LPVOID)This; This->lasttime_real = This->lasttime_sent = -1; + This->recv = This->xmit = NULL; return hr; }
1
0
0
0
Maarten Lankhorst : quartz: Keep track of the time in the video renderer.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 37847b0d9b884752e86eedc96bc3294b78a9b51b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37847b0d9b884752e86eedc96…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 15:00:51 2008 -0700 quartz: Keep track of the time in the video renderer. --- dlls/quartz/videorenderer.c | 54 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index f009eda..db80b65 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -85,6 +85,7 @@ typedef struct VideoRendererImpl IUnknown * pUnkOuter; BOOL bUnkOuterValid; BOOL bAggregatable; + REFERENCE_TIME rtLastStop; } VideoRendererImpl; static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -361,9 +362,26 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) TRACE("%p %p\n", iface, pSample); + hr = IMediaSample_GetTime(pSample, &tStart, &tStop); + if (FAILED(hr)) + ERR("Cannot get sample time (%x)\n", hr); + + if (This->rtLastStop != tStart) + { + if (IMediaSample_IsDiscontinuity(pSample) == S_FALSE) + ERR("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n", + (DWORD)(This->rtLastStop / 10000000), + (DWORD)((This->rtLastStop / 10000)%1000), + (DWORD)(tStart / 10000000), (DWORD)((tStart / 10000)%1000)); + This->rtLastStop = tStart; + } + /* Preroll means the sample isn't shown, this is used for key frames and things like that */ if (IMediaSample_IsPreroll(pSample) == S_OK) + { + This->rtLastStop = tStop; return S_OK; + } hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) @@ -372,10 +390,6 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) return hr; } - hr = IMediaSample_GetTime(pSample, &tStart, &tStop); - if (FAILED(hr)) - ERR("Cannot get sample time (%x)\n", hr); - cbSrcStream = IMediaSample_GetActualDataLength(pSample); TRACE("val %p %ld\n", pbSrcStream, cbSrcStream); @@ -393,6 +407,37 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) } #endif + if (This->pClock && This->state == State_Running) + { + REFERENCE_TIME time, trefstart, trefstop; + LONG delta; + + /* Perhaps I <SHOULD> use the reference clock AdviseTime function here + * I'm not going to! When I tried, it seemed to generate lag and + * it caused instability. + */ + IReferenceClock_GetTime(This->pClock, &time); + + trefstart = This->rtStreamStart; + trefstop = (REFERENCE_TIME)((double)(tStop - tStart) / This->pInputPin->dRate) + This->rtStreamStart; + delta = (LONG)((trefstart-time)/10000); + This->rtStreamStart = trefstop; + This->rtLastStop = tStop; + + if (delta > 0) + { + TRACE("Sleeping for %u ms\n", delta); + Sleep(delta); + } + else if (time > trefstop) + { + TRACE("Dropping sample: Time: %lld ms trefstop: %lld ms!\n", time/10000, trefstop/10000); + This->rtLastStop = tStop; + return S_OK; + } + } + This->rtLastStop = tStop; + VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream); return S_OK; @@ -464,6 +509,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) pVideoRenderer->pClock = NULL; pVideoRenderer->init = 0; pVideoRenderer->AutoShow = 1; + pVideoRenderer->rtLastStop = -1; ZeroMemory(&pVideoRenderer->filterInfo, sizeof(FILTER_INFO)); /* construct input pin */
1
0
0
0
Maarten Lankhorst : quartz: Fix bug in memallocator with test.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1fad872961499c48c2b33851636f8408d67321cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fad872961499c48c2b338516…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 09:26:20 2008 -0700 quartz: Fix bug in memallocator with test. --- dlls/quartz/memallocator.c | 6 +++--- dlls/quartz/tests/memallocator.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index cd87a34..12effbb 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -237,13 +237,13 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface) { if (!This->pProps) hr = VFW_E_SIZENOTSET; - else if (This->bCommitted) - hr = S_OK; - else if (This->bDecommitQueued) + else if (This->bDecommitQueued && This->bCommitted) { This->bDecommitQueued = FALSE; hr = S_OK; } + else if (This->bCommitted) + hr = S_OK; else { if (!(This->hSemWaiting = CreateSemaphoreW(NULL, This->pProps->cBuffers, This->pProps->cBuffers, NULL))) diff --git a/dlls/quartz/tests/memallocator.c b/dlls/quartz/tests/memallocator.c index 0a01db9..b0638e8 100644 --- a/dlls/quartz/tests/memallocator.c +++ b/dlls/quartz/tests/memallocator.c @@ -37,13 +37,15 @@ static void CommitDecommitTest(void) if (hr == S_OK) { - ALLOCATOR_PROPERTIES RequestedProps; - ALLOCATOR_PROPERTIES ActualProps; + ALLOCATOR_PROPERTIES RequestedProps; + ALLOCATOR_PROPERTIES ActualProps; - RequestedProps.cBuffers = 1; - RequestedProps.cbBuffer = 65536; - RequestedProps.cbAlign = 1; - RequestedProps.cbPrefix = 0; + IMediaSample *sample = NULL, *sample2 = NULL; + + RequestedProps.cBuffers = 2; + RequestedProps.cbBuffer = 65536; + RequestedProps.cbAlign = 1; + RequestedProps.cbPrefix = 0; hr = IMemAllocator_SetProperties(pMemAllocator, &RequestedProps, &ActualProps); ok(hr==S_OK, "SetProperties returned: %x\n", hr); @@ -53,12 +55,30 @@ static void CommitDecommitTest(void) hr = IMemAllocator_Commit(pMemAllocator); ok(hr==S_OK, "Commit returned: %x\n", hr); + hr = IMemAllocator_GetBuffer(pMemAllocator, &sample, NULL, NULL, 0); + ok(hr==S_OK, "Could not get a buffer: %x\n", hr); + hr = IMemAllocator_Decommit(pMemAllocator); ok(hr==S_OK, "Decommit returned: %x\n", hr); hr = IMemAllocator_Decommit(pMemAllocator); ok(hr==S_OK, "Cecommit returned: %x\n", hr); - IMemAllocator_Release(pMemAllocator); + /* Decommit and recommit while holding a sample */ + if (sample) + { + hr = IMemAllocator_Commit(pMemAllocator); + ok(hr==S_OK, "Commit returned: %x\n", hr); + + hr = IMemAllocator_GetBuffer(pMemAllocator, &sample2, NULL, NULL, 0); + ok(hr==S_OK, "Could not get a buffer: %x\n", hr); + IUnknown_Release(sample); + if (sample2) + IUnknown_Release(sample2); + + hr = IMemAllocator_Decommit(pMemAllocator); + ok(hr==S_OK, "Cecommit returned: %x\n", hr); + } + IMemAllocator_Release(pMemAllocator); } }
1
0
0
0
Maarten Lankhorst : quartz: Some state changes fixes.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 4e761d26135ba73bc8916fa3a3579512c1c3978b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e761d26135ba73bc8916fa3a…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Apr 28 16:35:53 2008 -0700 quartz: Some state changes fixes. --- dlls/quartz/pin.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 803a751..8619776 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1145,7 +1145,6 @@ HRESULT OutputPin_CommitAllocator(OutputPin * This) TRACE("(%p)->()\n", This); EnterCriticalSection(This->pin.pCritSec); - if (!This->custom_allocator) { if (!This->pin.pConnectedTo || !This->pMemInputPin) hr = VFW_E_NOT_CONNECTED; @@ -1164,6 +1163,7 @@ HRESULT OutputPin_CommitAllocator(OutputPin * This) } LeaveCriticalSection(This->pin.pCritSec); + TRACE("--> %08x\n", hr); return hr; } @@ -1474,10 +1474,6 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) IMediaSample * pSample = NULL; ALLOCATOR_PROPERTIES allocProps; - EnterCriticalSection(This->pin.pCritSec); - SetEvent(This->hEventStateChanged); - LeaveCriticalSection(This->pin.pCritSec); - hr = IMemAllocator_GetProperties(This->pAlloc, &allocProps); This->cbAlign = allocProps.cbAlign; @@ -1502,6 +1498,10 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) if (FAILED(hr)) ERR("Request error: %x\n", hr); + EnterCriticalSection(This->pin.pCritSec); + SetEvent(This->hEventStateChanged); + LeaveCriticalSection(This->pin.pCritSec); + do { DWORD_PTR dwUser; @@ -1568,9 +1568,11 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This) /* Can't reset state to Sleepy here because that might race, instead PauseProcessing will do that for us * Flush remaining samples */ - PullPin_Flush(This); + TRACE("Almost done..\n"); + if (This->fnDone) This->fnDone(This->pin.pUserData); + PullPin_Flush(This); TRACE("End: %08x, %d\n", hr, This->stop_playback); } @@ -1706,6 +1708,9 @@ HRESULT PullPin_PauseProcessing(PullPin * This) PullPin_WaitForStateChange(This, INFINITE); EnterCriticalSection(This->pin.pCritSec); + /* Faster! */ + IAsyncReader_BeginFlush(This->pReader); + assert(!This->stop_playback); assert(This->state == Req_Run|| This->state == Req_Sleepy); @@ -1737,7 +1742,6 @@ HRESULT PullPin_StopProcessing(PullPin * This) assert(WaitForSingleObject(This->thread_sleepy, 0) == WAIT_TIMEOUT); ResetEvent(This->hEventStateChanged); SetEvent(This->thread_sleepy); - return S_OK; }
1
0
0
0
Alexandre Julliard : winex11: Don' t put window manager decorations on shaped windows.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 2bbf00ed084f422c66f67f2c3d9738d6211dc885 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bbf00ed084f422c66f67f2c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 29 12:46:16 2008 +0200 winex11: Don't put window manager decorations on shaped windows. --- dlls/winex11.drv/window.c | 3 +++ dlls/winex11.drv/x11drv.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 0f84ae2..ad56a70 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -163,6 +163,7 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data, if (!decorated_mode) return 0; if (IsRectEmpty( &data->window_rect )) return 0; + if (data->shaped) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -321,6 +322,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data, { #ifdef HAVE_LIBXSHAPE if (!data->whole_window) return; + data->shaped = FALSE; if (!hrgn) { @@ -341,6 +343,7 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data, pRegionData->rdh.nCount, ShapeSet, YXBanded ); wine_tsx11_unlock(); HeapFree(GetProcessHeap(), 0, pRegionData); + data->shaped = TRUE; } } #endif /* HAVE_LIBXSHAPE */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index f46eaaa..2f2e583 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -690,6 +690,7 @@ struct x11drv_win_data BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */ BOOL iconic : 1; /* is window in iconic state? */ BOOL embedded : 1; /* is window an XEMBED client? */ + BOOL shaped : 1; /* is window using a custom region shape? */ int wm_state; /* current value of the WM_STATE property */ DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */ HBITMAP hWMIconBitmap;
1
0
0
0
Alexandre Julliard : documentation: Remove PACKAGING, this is maintained on the wiki now.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 6ff4ba7e680466b5966a4c8ed76017f7d51750c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ff4ba7e680466b5966a4c8ed…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 29 12:46:30 2008 +0200 documentation: Remove PACKAGING, this is maintained on the wiki now. --- documentation/PACKAGING | 500 ----------------------------------------------- 1 files changed, 0 insertions(+), 500 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6ff4ba7e680466b5966a4…
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLInputElement.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 7582518e18b50bf4ebbd2cda30822d25be3d81a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7582518e18b50bf4ebbd2cda3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:39:09 2008 +0200 mshtml: Added IDispatchEx support to HTMLInputElement. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlinput.c | 16 ++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 834f3b3..37a3b3d 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -54,6 +54,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDocument, &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, + &DIID_DispHTMLInputElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -66,6 +67,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement, &IID_IHTMLElement2, &IID_IHTMLElementCollection, + &IID_IHTMLInputElement, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index dd0a8b5..3ba954f 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1059,6 +1059,20 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = { HTMLInputElement_destructor }; +static dispex_static_data_t HTMLInputElement_dispex = { + NULL, + DispHTMLInputElement_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLInputElement_tid, + 0 + } +}; + HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem) { HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement)); @@ -1069,6 +1083,8 @@ HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem) ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl; ret->element.node.vtbl = &HTMLInputElementImplVtbl; + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLINPUT(ret), &HTMLInputElement_dispex); + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput); if(NS_FAILED(nsres)) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 42381b5..911abe0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -64,6 +64,7 @@ typedef enum { DispHTMLDocument_tid, DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, + DispHTMLInputElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -76,6 +77,7 @@ typedef enum { IHTMLElement_tid, IHTMLElement2_tid, IHTMLElementCollection_tid, + IHTMLInputElement_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid,
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLOptionElement.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 928914c81ebbbb21ff66e3b044036bf7a4172d08 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=928914c81ebbbb21ff66e3b04…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:39:38 2008 +0200 mshtml: Added IDispatchEx support to HTMLOptionElement. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmloption.c | 16 ++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 37a3b3d..6f17a9d 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -55,6 +55,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, &DIID_DispHTMLInputElement, + &DIID_DispHTMLOptionElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &IID_IHTMLDocument2, @@ -68,6 +69,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement2, &IID_IHTMLElementCollection, &IID_IHTMLInputElement, + &IID_IHTMLOptionElement, &IID_IHTMLWindow2, &IID_IHTMLWindow3, &IID_IOmNavigator diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 7252dde..a642295 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -331,6 +331,20 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = { HTMLOptionElement_destructor }; +static dispex_static_data_t HTMLOptionElement_dispex = { + NULL, + DispHTMLOptionElement_tid, + NULL, + { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLOptionElement_tid, + 0 + } +}; + HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem) { HTMLOptionElement *ret = heap_alloc_zero(sizeof(HTMLOptionElement)); @@ -345,6 +359,8 @@ HTMLElement *HTMLOptionElement_Create(nsIDOMHTMLElement *nselem) if(NS_FAILED(nsres)) ERR("Could not get nsIDOMHTMLOptionElement interface: %08x\n", nsres); + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLOPTION(ret), &HTMLOptionElement_dispex); + return &ret->element; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 911abe0..55c0090 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -65,6 +65,7 @@ typedef enum { DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, DispHTMLInputElement_tid, + DispHTMLOptionElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, IHTMLDocument2_tid, @@ -78,6 +79,7 @@ typedef enum { IHTMLElement2_tid, IHTMLElementCollection_tid, IHTMLInputElement_tid, + IHTMLOptionElement_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, IOmNavigator_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 7d607d7..7a9b05d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -221,10 +221,10 @@ static const elem_type_info_t elem_type_infos[] = { {"TITLE", elem_iids, NULL}, {"BODY", body_iids, NULL}, {"A", anchor_iids, NULL}, - {"INPUT", input_iids, NULL}, + {"INPUT", input_iids, &DIID_DispHTMLInputElement}, {"SELECT", select_iids, NULL}, {"TEXTAREA", textarea_iids, NULL}, - {"OPTION", option_iids, NULL}, + {"OPTION", option_iids, &DIID_DispHTMLOptionElement}, {"STYLE", elem_iids, NULL}, {"BLOCKQUOTE",elem_iids, NULL}, {"P", elem_iids, NULL},
1
0
0
0
Jacek Caban : mshtml: Added indexed access to HTMLElementCollection object support.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 1597967417caa123153bec5b307f31ed7fd5fa18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1597967417caa123153bec5b3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:38:41 2008 +0200 mshtml: Added indexed access to HTMLElementCollection object support. --- dlls/mshtml/htmlelem.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 51 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index faf888c..f9b416a 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1651,6 +1651,51 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface, return S_OK; } +#define DISPID_ELEMCOL_0 MSHTML_DISPID_CUSTOM_MIN + +static HRESULT HTMLElementCollection_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + WCHAR *ptr; + DWORD idx=0; + + for(ptr = name; *ptr && isdigitW(*ptr); ptr++) + idx = idx*10 + (*ptr-'0'); + + if(*ptr || idx >= This->len) + return DISP_E_UNKNOWNNAME; + + *dispid = DISPID_ELEMCOL_0 + idx; + TRACE("ret %x\n", *dispid); + return S_OK; +} + +static HRESULT HTMLElementCollection_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + HTMLElementCollection *This = ELEMCOL_THIS(iface); + DWORD idx; + + TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller); + + idx = id - DISPID_ELEMCOL_0; + if(idx >= This->len) + return DISP_E_UNKNOWNNAME; + + switch(flags) { + case INVOKE_PROPERTYGET: + V_VT(res) = VT_DISPATCH; + V_DISPATCH(res) = (IDispatch*)HTMLELEM(This->elems[idx]); + IHTMLElement_AddRef(HTMLELEM(This->elems[idx])); + break; + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; +} + #undef ELEMCOL_THIS static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { @@ -1669,8 +1714,13 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { HTMLElementCollection_tags }; +static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = { + HTMLElementCollection_get_dispid, + HTMLElementCollection_invoke +}; + static dispex_static_data_t HTMLElementCollection_dispex = { - NULL, + &HTMLElementColection_dispex_vtbl, DispHTMLElementCollection_tid, NULL, {
1
0
0
0
Jacek Caban : mshtml: Added support for custom DISPIDs.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: ef4200fcf78159e1b7f1d5f87f98b054d15dbf75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef4200fcf78159e1b7f1d5f87…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:38:09 2008 +0200 mshtml: Added support for custom DISPIDs. --- dlls/mshtml/dispex.c | 16 ++++++++++++++++ dlls/mshtml/htmldoc.c | 1 + dlls/mshtml/htmlelem.c | 2 ++ dlls/mshtml/htmltextnode.c | 1 + dlls/mshtml/htmlwindow.c | 1 + dlls/mshtml/mshtml_private.h | 11 ++++++++++- dlls/mshtml/omnavigator.c | 1 + 7 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 153d864..834f3b3 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -277,6 +277,11 @@ void call_disp_func(HTMLDocument *doc, IDispatch *disp) VariantClear(&res); } +static inline BOOL is_custom_dispid(DISPID id) +{ + return MSHTML_DISPID_CUSTOM_MIN <= id && id <= MSHTML_DISPID_CUSTOM_MAX; +} + #define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface) static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) @@ -395,6 +400,14 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW min = n+1; } + if(This->data->vtbl && This->data->vtbl->get_dispid) { + HRESULT hres; + + hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid); + if(hres != DISP_E_UNKNOWNNAME) + return hres; + } + TRACE("not found %s\n", debugstr_w(bstrName)); return DISP_E_UNKNOWNNAME; } @@ -412,6 +425,9 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke) + return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + if(wFlags == DISPATCH_CONSTRUCT) { FIXME("DISPATCH_CONSTRUCT not implemented\n"); return E_NOTIMPL; diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 425fb39..73e31f1 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1491,6 +1491,7 @@ static const IDispatchExVtbl DocDispatchExVtbl = { }; static dispex_static_data_t HTMLDocument_dispex = { + NULL, DispHTMLDocument_tid, NULL, { diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index c44e2e5..faf888c 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1283,6 +1283,7 @@ static const NodeImplVtbl HTMLElementImplVtbl = { }; static dispex_static_data_t HTMLElement_dispex = { + NULL, DispHTMLUnknownElement_tid, NULL, { @@ -1669,6 +1670,7 @@ static const IHTMLElementCollectionVtbl HTMLElementCollectionVtbl = { }; static dispex_static_data_t HTMLElementCollection_dispex = { + NULL, DispHTMLElementCollection_tid, NULL, { diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c index fa6308e..b98821b 100644 --- a/dlls/mshtml/htmltextnode.c +++ b/dlls/mshtml/htmltextnode.c @@ -186,6 +186,7 @@ static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = { }; static dispex_static_data_t HTMLDOMTextNode_dispex = { + NULL, DispHTMLDOMTextNode_tid, 0, { diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 82b03e6..2073132 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1108,6 +1108,7 @@ static const IDispatchExVtbl WindowDispExVtbl = { }; static dispex_static_data_t HTMLWindow_dispex = { + NULL, DispHTMLWindow2_tid, NULL, { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 126bc2e..42381b5 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Jacek Caban for CodeWeavers + * Copyright 2005-2008 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -84,7 +84,16 @@ typedef enum { typedef struct dispex_data_t dispex_data_t; +#define MSHTML_DISPID_CUSTOM_MIN 0x60000000 +#define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff + +typedef struct { + HRESULT (*get_dispid)(IUnknown*,BSTR,DWORD,DISPID*); + HRESULT (*invoke)(IUnknown*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); +} dispex_static_data_vtbl_t; + typedef struct { + const dispex_static_data_vtbl_t *vtbl; const tid_t disp_tid; dispex_data_t *data; const tid_t iface_tids[]; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 742df19..74b2cfd 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -301,6 +301,7 @@ static const IOmNavigatorVtbl OmNavigatorVtbl = { }; static dispex_static_data_t OmNavigator_dispex = { + NULL, IOmNavigator_tid, NULL, {
1
0
0
0
Jacek Caban : mshtml: Added IHTMLCommentElement declaration.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 96fdb0e7425317eece64e573f9444521194bd931 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96fdb0e7425317eece64e573f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:35:18 2008 +0200 mshtml: Added IHTMLCommentElement declaration. --- include/mshtmdid.h | 13 +++++++++ include/mshtml.idl | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 0 deletions(-) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index c6b98a4..579face 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -2054,6 +2054,19 @@ #define DISPID_IHTMLTABLECAPTION_ALIGN STDPROPID_XOBJ_BLOCKALIGN #define DISPID_IHTMLTABLECAPTION_VALIGN DISPID_A_TABLEVALIGN + /* IHTMLCommentElement */ +#define DISPID_IHTMLCOMMENTELEMENT_TEXT DISPID_COMMENTPDL+1 +#define DISPID_IHTMLCOMMENTELEMENT_ATOMIC DISPID_COMMENTPDL+2 + + /* IHTMLCommentElement2 */ +#define DISPID_IHTMLCOMMENTELEMENT2_DATA DISPID_COMMENTPDL+3 +#define DISPID_IHTMLCOMMENTELEMENT2_LENGTH DISPID_COMMENTPDL+4 +#define DISPID_IHTMLCOMMENTELEMENT2_SUBSTRINGDATA DISPID_COMMENTPDL+5 +#define DISPID_IHTMLCOMMENTELEMENT2_APPENDDATA DISPID_COMMENTPDL+6 +#define DISPID_IHTMLCOMMENTELEMENT2_INSERTDATA DISPID_COMMENTPDL+7 +#define DISPID_IHTMLCOMMENTELEMENT2_DELETEDATA DISPID_COMMENTPDL+8 +#define DISPID_IHTMLCOMMENTELEMENT2_REPLACEDATA DISPID_COMMENTPDL+9 + /* IHTMLTable */ #define DISPID_IHTMLTABLE_COLS DISPID_TABLE+1 #define DISPID_IHTMLTABLE_BORDER DISPID_TABLE+2 diff --git a/include/mshtml.idl b/include/mshtml.idl index 4091e8d..055150b 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -9633,6 +9633,76 @@ coclass HTMLDocument } /***************************************************************************** + * IHTMLCommentElement interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f20c-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLCommentElement : IDispatch +{ + [propput, id(DISPID_IHTMLCOMMENTELEMENT_TEXT), displaybind, bindable] + HRESULT text([in] BSTR v); + + [propget, id(DISPID_IHTMLCOMMENTELEMENT_TEXT), displaybind, bindable] + HRESULT text([out, retval] BSTR *p); + + [propput, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable] + HRESULT atomic([in] long v); + + [propget, id(DISPID_IHTMLCOMMENTELEMENT_ATOMIC), displaybind, bindable] + HRESULT atomic([out, retval] long *p); +} + +/***************************************************************************** + * IHTMLCommentElement2 interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f813-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLCommentElement2 : IDispatch +{ + [propput, id(DISPID_IHTMLCOMMENTELEMENT2_DATA)] + HRESULT data([in] BSTR v); + + [propget, id(DISPID_IHTMLCOMMENTELEMENT2_DATA)] + HRESULT data([out, retval] BSTR *p); + + [propget, id(DISPID_IHTMLCOMMENTELEMENT2_LENGTH)] + HRESULT length([out, retval] long *p); + + [id(DISPID_IHTMLCOMMENTELEMENT2_SUBSTRINGDATA)] + HRESULT substringData( + [in] long offset, + [in] long Count, + [out, retval] BSTR *pbstrsubString); + + [id(DISPID_IHTMLCOMMENTELEMENT2_APPENDDATA)] + HRESULT appendData([in] BSTR bstrstring); + + [id(DISPID_IHTMLCOMMENTELEMENT2_INSERTDATA)] + HRESULT insertData( + [in] long offset, + [in] BSTR bstrstring); + + [id(DISPID_IHTMLCOMMENTELEMENT2_DELETEDATA)] + HRESULT deleteData( + [in] long offset, + [in] long Count); + + [id(DISPID_IHTMLCOMMENTELEMENT2_REPLACEDATA)] + HRESULT replaceData( + [in] long offset, + [in] long Count, + [in] BSTR bstrstring); +} + +/***************************************************************************** * HTMLTableEvents dispinterface */ [
1
0
0
0
Jacek Caban : mshtml.idl: Added DispHTMLOptionElement declaration.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 3186aa7a6508a03d0021c41ba1e4e1685952b892 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3186aa7a6508a03d0021c41ba…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:42:19 2008 +0200 mshtml.idl: Added DispHTMLOptionElement declaration. --- include/mshtmdid.h | 3 + include/mshtml.idl | 891 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 894 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3186aa7a6508a03d0021c…
1
0
0
0
Jacek Caban : mshtml.idl: Added IHTMLDOMChildrenCollection and DispDOMChildrenCollection declaration .
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: f885b332189f3656acd60834c677e6b76735b88a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f885b332189f3656acd60834c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 29 01:34:00 2008 +0200 mshtml.idl: Added IHTMLDOMChildrenCollection and DispDOMChildrenCollection declaration. --- include/mshtmdid.h | 5 +++++ include/mshtml.idl | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 0 deletions(-) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index 583d124..94303d5 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -992,6 +992,11 @@ /* IHTMLElementCollection3 */ #define DISPID_IHTMLELEMENTCOLLECTION3_NAMEDITEM DISPID_COLLECTION+6 +/* IHTMLDOMChildrenCollection */ +#define DISPID_IHTMLDOMCHILDRENCOLLECTION_LENGTH DISPID_COLLECTION +#define DISPID_IHTMLDOMCHILDRENCOLLECTION__NEWENUM DISPID_NEWENUM +#define DISPID_IHTMLDOMCHILDRENCOLLECTION_ITEM DISPID_VALUE + /* HTMLElementEvents */ #define DISPID_HTMLELEMENTEVENTS_ONHELP DISPID_EVMETH_ONHELP #define DISPID_HTMLELEMENTEVENTS_ONCLICK DISPID_EVMETH_ONCLICK diff --git a/include/mshtml.idl b/include/mshtml.idl index 1a33bf5..8e071f5 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -1841,6 +1841,49 @@ methods: IDispatch *ownerDocument(); } +/***************************************************************************** + * IHTMLDOMChildrenCollection interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f5ab-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLDOMChildrenCollection : IDispatch +{ + [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION_LENGTH)] + HRESULT length([out, retval] long *p); + + [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION__NEWENUM), hidden, restricted] + HRESULT _newEnum([out, retval] IUnknown **p); + + [id(DISPID_IHTMLDOMCHILDRENCOLLECTION_ITEM)] + HRESULT item( + [in] long index, + [out, retval] IDispatch **ppItem); +} + +/***************************************************************************** + * DispDOMChildrenCollection dispinterface + */ +[ + hidden, + uuid(3050f577-98b5-11cf-bb82-00aa00bdce0b) +] +dispinterface DispDOMChildrenCollection +{ +properties: +methods: + [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION_LENGTH)] + long length(); + + [propget, id(DISPID_IHTMLDOMCHILDRENCOLLECTION__NEWENUM), hidden, restricted] + IUnknown *_newEnum(); + + [id(DISPID_IHTMLDOMCHILDRENCOLLECTION_ITEM)] + IDispatch *item([in] long index); +} interface IHTMLElementCollection;
1
0
0
0
Andrew Talbot : shlwapi: Remove unused variables.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: af3055e2e1bb7be0bdcaa70c7efbf9353aee1525 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af3055e2e1bb7be0bdcaa70c7…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Mon Apr 28 22:17:14 2008 +0100 shlwapi: Remove unused variables. --- dlls/shlwapi/ordinal.c | 4 ++-- dlls/shlwapi/reg.c | 14 ++++++-------- dlls/shlwapi/url.c | 6 ++---- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 5786c94..d1668a6 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -1492,11 +1492,11 @@ HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID ri */ BOOL WINAPI SHLoadMenuPopup(HINSTANCE hInst, LPCWSTR szName) { - HMENU hMenu, hSubMenu; + HMENU hMenu; if ((hMenu = LoadMenuW(hInst, szName))) { - if ((hSubMenu = GetSubMenu(hMenu, 0))) + if (GetSubMenu(hMenu, 0)) RemoveMenu(hMenu, 0, MF_BYPOSITION); DestroyMenu(hMenu); diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 52908e9..9239824 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -626,7 +626,6 @@ BOOL WINAPI SHRegGetBoolUSValueA( BOOL fIgnoreHKCU, /* [I] TRUE=Don't check HKEY_CURRENT_USER */ BOOL fDefault) /* [I] Default value to use if pszValue is not present */ { - LONG retvalue; DWORD type, datalen, work; BOOL ret = fDefault; CHAR data[10]; @@ -636,9 +635,9 @@ BOOL WINAPI SHRegGetBoolUSValueA( (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM"); datalen = sizeof(data)-1; - if (!(retvalue = SHRegGetUSValueA( pszSubKey, pszValue, &type, - data, &datalen, - fIgnoreHKCU, 0, 0))) { + if (!SHRegGetUSValueA( pszSubKey, pszValue, &type, + data, &datalen, + fIgnoreHKCU, 0, 0)) { /* process returned data via type into bool */ switch (type) { case REG_SZ: @@ -687,7 +686,6 @@ BOOL WINAPI SHRegGetBoolUSValueW( static const WCHAR wTRUE[]= {'T','R','U','E','\0'}; static const WCHAR wNO[]= {'N','O','\0'}; static const WCHAR wFALSE[]={'F','A','L','S','E','\0'}; - LONG retvalue; DWORD type, datalen, work; BOOL ret = fDefault; WCHAR data[10]; @@ -697,9 +695,9 @@ BOOL WINAPI SHRegGetBoolUSValueW( (fIgnoreHKCU) ? "Ignoring HKCU" : "Tries HKCU then HKLM"); datalen = (sizeof(data)-1) * sizeof(WCHAR); - if (!(retvalue = SHRegGetUSValueW( pszSubKey, pszValue, &type, - data, &datalen, - fIgnoreHKCU, 0, 0))) { + if (!SHRegGetUSValueW( pszSubKey, pszValue, &type, + data, &datalen, + fIgnoreHKCU, 0, 0)) { /* process returned data via type into bool */ switch (type) { case REG_SZ: diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 1ff4312..2593f96 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -2153,7 +2153,6 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, BOOL WINAPI PathIsURLA(LPCSTR lpstrPath) { PARSEDURLA base; - DWORD res1; TRACE("%s\n", debugstr_a(lpstrPath)); @@ -2161,7 +2160,7 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath) /* get protocol */ base.cbSize = sizeof(base); - res1 = ParseURLA(lpstrPath, &base); + ParseURLA(lpstrPath, &base); return (base.nScheme != URL_SCHEME_INVALID); } @@ -2173,7 +2172,6 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath) BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath) { PARSEDURLW base; - DWORD res1; TRACE("%s\n", debugstr_w(lpstrPath)); @@ -2181,7 +2179,7 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath) /* get protocol */ base.cbSize = sizeof(base); - res1 = ParseURLW(lpstrPath, &base); + ParseURLW(lpstrPath, &base); return (base.nScheme != URL_SCHEME_INVALID); }
1
0
0
0
Tijl Coosemans : hhctrl.ocx: Plug memory leak.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: af72d10014a4f2e74da3e55f89c635823744284f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af72d10014a4f2e74da3e55f8…
Author: Tijl Coosemans <tijl(a)ulyssis.org> Date: Mon Apr 28 22:42:56 2008 +0200 hhctrl.ocx: Plug memory leak. --- dlls/hhctrl.ocx/hhctrl.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index c0054de..e663c11 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -144,7 +144,10 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat url = FindContextAlias(info->pCHMInfo, data); if(!url) + { + ReleaseHelpViewer(info); return NULL; + } NavigateToUrl(info, url); heap_free(url);
1
0
0
0
Eric Pouech : winhelp: Make richedit the default for rendering.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 9b24f2a0507d173e65641649a70fced300afab26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b24f2a0507d173e65641649a…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Apr 28 21:16:09 2008 +0200 winhelp: Make richedit the default for rendering. --- programs/winhelp/winhelp.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index fd605a9..62eb98f 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -251,7 +251,11 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) Globals.hInstance = hInstance; - use_richedit = getenv("WINHELP_RICHEDIT") != NULL; + /* don't use richedit for rendering when WINHELP_RICHEDIT environment variable is 0 */ + { + const char* p = getenv("WINHELP_RICHEDIT"); + use_richedit = !p || *p != '0'; + } if (use_richedit && LoadLibrary("riched20.dll") == NULL) return MessageBox(0, MAKEINTRESOURCE(STID_NO_RICHEDIT), MAKEINTRESOURCE(STID_WHERROR), MB_OK);
1
0
0
0
Eric Pouech : msvcrt: Fixed space in type with double indirection.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: f55da6db848e27472cd4d0ade1c61c171e7866cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f55da6db848e27472cd4d0ade…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Apr 28 21:18:32 2008 +0200 msvcrt: Fixed space in type with double indirection. Spotted by James Hawkins. --- dlls/msvcrt/tests/cpp.c | 2 +- dlls/msvcrt/undname.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 2b815b7..ef80cac 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -984,7 +984,7 @@ static void test_demangle(void) {"?$AAA@$DBAB@", "AAA<`template-parameter257'>"}, {"?$AAA@?C@", "AAA<`template-parameter-2'>"}, {"?$AAA@PAUBBB@@", "AAA<struct BBB *>"}, -{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa **,class ee *)"}, +{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa * *,class ee *)"}, {"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"}, {"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"}, {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"}, diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 9bc0970..1d9fae7 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -410,7 +410,7 @@ static BOOL get_modifier(char ch, const char** ret) } static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym, - struct array *pmt_ref, char modif) + struct array *pmt_ref, char modif, BOOL in_args) { const char* modifier; const char* str_modif; @@ -465,7 +465,7 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym, else { /* don't insert a space between duplicate '*' */ - if (str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*') + if (!in_args && str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*') str_modif++; ct->left = str_printf(sym, "%s%s", sub_ct.left, str_modif ); } @@ -793,17 +793,17 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, } else { - if (!get_modified_type(ct, sym, pmt_ref, '?')) goto done; + if (!get_modified_type(ct, sym, pmt_ref, '?', in_args)) goto done; } break; case 'A': /* reference */ case 'B': /* volatile reference */ - if (!get_modified_type(ct, sym, pmt_ref, dt)) goto done; + if (!get_modified_type(ct, sym, pmt_ref, dt, in_args)) goto done; break; case 'Q': /* const pointer */ case 'R': /* volatile pointer */ case 'S': /* const volatile pointer */ - if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P')) goto done; + if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P', in_args)) goto done; break; case 'P': /* Pointer */ if (isdigit(*sym->current)) @@ -833,7 +833,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, } else goto done; } - else if (!get_modified_type(ct, sym, pmt_ref, 'P')) goto done; + else if (!get_modified_type(ct, sym, pmt_ref, 'P', in_args)) goto done; break; case 'W': if (*sym->current == '4')
1
0
0
0
Eric Pouech : msvcrt: undname: correctly handle multi-dimensional arrays.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: 2e1775620a0faaf50c5620d69555c0ad7cc9e51e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e1775620a0faaf50c5620d69…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Apr 28 21:18:26 2008 +0200 msvcrt: undname: correctly handle multi-dimensional arrays. Based on a patch from Ulrich Küttler. --- dlls/msvcrt/tests/cpp.c | 4 ++++ dlls/msvcrt/undname.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 5daa4cc..2b815b7 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -985,6 +985,10 @@ static void test_demangle(void) {"?$AAA@?C@", "AAA<`template-parameter-2'>"}, {"?$AAA@PAUBBB@@", "AAA<struct BBB *>"}, {"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa **,class ee *)"}, +{"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"}, +{"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"}, +{"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"}, + }; int i, num_test = (sizeof(test)/sizeof(test[0])); char* name; diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index f115dca..9bc0970 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -24,6 +24,7 @@ #include <assert.h> #include <stdio.h> +#include <stdlib.h> #include "msvcrt.h" #include "wine/debug.h" @@ -431,6 +432,31 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym, unsigned mark = sym->stack.num; struct datatype_t sub_ct; + /* multidimensional arrays */ + if (*sym->current == 'Y') + { + const char* n1; + int num; + + sym->current++; + if (!(n1 = get_number(sym))) return FALSE; + num = atoi(n1); + + if (str_modif[0] == ' ' && !modifier) + str_modif++; + + if (modifier) + { + str_modif = str_printf(sym, " (%s%s)", modifier, str_modif); + modifier = NULL; + } + else + str_modif = str_printf(sym, " (%s)", str_modif); + + while (num--) + str_modif = str_printf(sym, "%s[%s]", str_modif, get_number(sym)); + } + /* Recurse to get the referred-to type */ if (!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE)) return FALSE; @@ -872,6 +898,17 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, ct->left = str_printf(sym, "`non-type-template-parameter%s'", ptr); } break; + case '$': + if (*sym->current == 'C') + { + const char* ptr; + + sym->current++; + if (!get_modifier(*sym->current++, &ptr)) goto done; + if (!demangle_datatype(sym, ct, pmt_ref, in_args)) goto done; + ct->left = str_printf(sym, "%s %s", ct->left, ptr); + } + break; } break; default :
1
0
0
0
Eric Pouech : msvcrt: Fixed symbol unmangling for template-parameter-?? form, as well as test.
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: a940218c0b5b64f638b0e1678024659cd77e2089 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a940218c0b5b64f638b0e1678…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Apr 28 21:18:20 2008 +0200 msvcrt: Fixed symbol unmangling for template-parameter-?? form, as well as test. Spotted by James Hawkins. --- dlls/msvcrt/tests/cpp.c | 2 +- dlls/msvcrt/undname.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 2788a56..5daa4cc 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -982,7 +982,7 @@ static void test_demangle(void) { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "private: static int (__cdecl** Bar::Qux)(class Bar *,int &,int &,int *)" }, { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "Bar::Qux", 0x1800}, {"?$AAA@$DBAB@", "AAA<`template-parameter257'>"}, -{"?$AAA@$D?4@", "AAA<`template-parameter-5'>"}, +{"?$AAA@?C@", "AAA<`template-parameter-2'>"}, {"?$AAA@PAUBBB@@", "AAA<struct BBB *>"}, {"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa **,class ee *)"}, }; diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 93030b2..f115dca 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -759,7 +759,16 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, break; case '?': /* not all the time is seems */ - if (!get_modified_type(ct, sym, pmt_ref, '?')) goto done; + if (in_args) + { + const char* ptr; + if (!(ptr = get_number(sym))) goto done; + ct->left = str_printf(sym, "`template-parameter-%s'", ptr); + } + else + { + if (!get_modified_type(ct, sym, pmt_ref, '?')) goto done; + } break; case 'A': /* reference */ case 'B': /* volatile reference */
1
0
0
0
Rob Shearman : rpcss: When registering a moniker that is already registered in the ROT another ROT entry should still be created and a distinct cookie returned .
by Alexandre Julliard
29 Apr '08
29 Apr '08
Module: wine Branch: master Commit: b9f8a81d8c8ebf35d597b3cc0b35813d0473da7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9f8a81d8c8ebf35d597b3cc0…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Apr 28 19:42:35 2008 +0100 rpcss: When registering a moniker that is already registered in the ROT another ROT entry should still be created and a distinct cookie returned. --- dlls/ole32/tests/moniker.c | 1 - programs/rpcss/irotp.c | 20 +++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index aa737c0..b15cce4 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -690,7 +690,6 @@ static void test_ROT_multiple_entries(void) hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&Test_ClassFactory, pMoniker, &dwCookie2); ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08x\n", hr); - todo_wine ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1); hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject); diff --git a/programs/rpcss/irotp.c b/programs/rpcss/irotp.c index 21ede32..6f32205 100644 --- a/programs/rpcss/irotp.c +++ b/programs/rpcss/irotp.c @@ -137,24 +137,14 @@ HRESULT IrotRegister( } } - if (hr == S_OK) - { - list_add_tail(&RunningObjectTable, &rot_entry->entry); - /* gives a registration identifier to the registered object*/ - *cookie = rot_entry->cookie = InterlockedIncrement(&last_cookie); - *ctxt_handle = rot_entry; - } - else - { - rot_entry_release(rot_entry); - *cookie = existing_rot_entry->cookie; - InterlockedIncrement(&existing_rot_entry->refs); - *ctxt_handle = existing_rot_entry; - } - + list_add_tail(&RunningObjectTable, &rot_entry->entry); LeaveCriticalSection(&csRunningObjectTable); + /* gives a registration identifier to the registered object*/ + *cookie = rot_entry->cookie = InterlockedIncrement(&last_cookie); + *ctxt_handle = rot_entry; + return hr; }
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200