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
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
July 2008
----- 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
3 participants
1114 discussions
Start a n
N
ew thread
Nikolay Sivov : gdiplus: Implemented GdipPathIterHasCurve with tests.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: c47b16765711dd8551eb00b0fb219ec3508803b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c47b16765711dd8551eb00b0f…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Jul 3 18:34:36 2008 +0400 gdiplus: Implemented GdipPathIterHasCurve with tests. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/pathiterator.c | 18 ++++++++++++++++ dlls/gdiplus/tests/pathiterator.c | 40 +++++++++++++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 4 files changed, 60 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 233c101..9492065 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -454,7 +454,7 @@ @ stdcall GdipPathIterEnumerate(ptr ptr ptr ptr long) @ stdcall GdipPathIterGetCount(ptr ptr) @ stub GdipPathIterGetSubpathCount -@ stub GdipPathIterHasCurve +@ stdcall GdipPathIterHasCurve(ptr ptr) @ stub GdipPathIterIsValid @ stub GdipPathIterNextMarker @ stub GdipPathIterNextMarkerPath diff --git a/dlls/gdiplus/pathiterator.c b/dlls/gdiplus/pathiterator.c index eb2cf34..abb5dbb 100644 --- a/dlls/gdiplus/pathiterator.c +++ b/dlls/gdiplus/pathiterator.c @@ -87,6 +87,24 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator* iterator, return Ok; } +GpStatus WINGDIPAPI GdipPathIterHasCurve(GpPathIterator* iterator, BOOL* hasCurve) +{ + INT i; + + if(!iterator) + return InvalidParameter; + + *hasCurve = FALSE; + + for(i = 0; i < iterator->pathdata.Count; i++) + if((iterator->pathdata.Types[i] & PathPointTypePathTypeMask) == PathPointTypeBezier){ + *hasCurve = TRUE; + break; + } + + return Ok; +} + GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator* iterator, INT *resultCount, INT* startIndex, INT* endIndex, BOOL* isClosed) { diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index 24c6990..baeb22b 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -51,6 +51,45 @@ static void test_constructor_destructor(void) GdipDeletePath(path); } +static void test_hascurve(void) +{ + GpPath *path; + GpPathIterator *iter; + GpStatus stat; + BOOL hasCurve; + + GdipCreatePath(FillModeAlternate, &path); + GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); + + stat = GdipCreatePathIter(&iter, path); + expect(Ok, stat); + + /* NULL args + BOOL out argument is local in wrapper class method, + so it always has not-NULL address */ + stat = GdipPathIterHasCurve(NULL, &hasCurve); + expect(InvalidParameter, stat); + + /* valid args */ + stat = GdipPathIterHasCurve(iter, &hasCurve); + expect(Ok, stat); + expect(FALSE, hasCurve); + + GdipDeletePathIter(iter); + + GdipAddPathEllipse(path, 0.0, 0.0, 35.0, 70.0); + + stat = GdipCreatePathIter(&iter, path); + expect(Ok, stat); + + stat = GdipPathIterHasCurve(iter, &hasCurve); + expect(Ok, stat); + expect(TRUE, hasCurve); + + GdipDeletePathIter(iter); + GdipDeletePath(path); +} + START_TEST(pathiterator) { struct GdiplusStartupInput gdiplusStartupInput; @@ -64,6 +103,7 @@ START_TEST(pathiterator) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); test_constructor_destructor(); + test_hascurve(); GdiplusShutdown(gdiplusToken); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 46b05c5..9ef7ad7 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -285,6 +285,7 @@ GpStatus WINGDIPAPI GdipPathIterNextSubpath(GpPathIterator*,INT*,INT*,INT*,BOOL* GpStatus WINGDIPAPI GdipPathIterRewind(GpPathIterator*); GpStatus WINGDIPAPI GdipPathIterGetCount(GpPathIterator*,INT*); GpStatus WINGDIPAPI GdipPathIterEnumerate(GpPathIterator*,INT*,GpPointF*,BYTE*,INT); +GpStatus WINGDIPAPI GdipPathIterHasCurve(GpPathIterator*,BOOL*); GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap*,GpCustomLineCap**); GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL,
1
0
0
0
Alexander Morozov : wininet: Remove unneeded variable.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 70218092bb90e023c40211e01c29ea3c811d1769 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70218092bb90e023c40211e01…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Thu Jul 3 16:22:33 2008 +0400 wininet: Remove unneeded variable. --- dlls/wininet/http.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 5e527a1..970e502 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1394,7 +1394,6 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr) static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) { LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr; - LPWININETHTTPSESSIONW lpwhs = NULL; TRACE("%p\n",lpwhr); @@ -1426,8 +1425,6 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) lpwhr->pProxyAuthInfo = NULL; } - lpwhs = lpwhr->lpHttpSession; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
1
0
0
0
Maarten Lankhorst : quartz: Implement state transitions in video renderer.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 9985f2efc9d1e92932dd3d7f351ded3ae1db0b80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9985f2efc9d1e92932dd3d7f3…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 01:33:04 2008 -0700 quartz: Implement state transitions in video renderer. --- dlls/quartz/videorenderer.c | 101 +++++++++++++++++++++++++++++++++--------- 1 files changed, 79 insertions(+), 22 deletions(-) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 23a5cd9..1ade1c8 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -71,6 +71,8 @@ typedef struct VideoRendererImpl BOOL init; HANDLE hThread; + HANDLE blocked; + DWORD ThreadID; HANDLE hEvent; BOOL ThreadResult; @@ -231,7 +233,7 @@ static DWORD WINAPI MessageLoop(LPVOID lpParameter) static BOOL CreateRenderingSubsystem(VideoRendererImpl* This) { - This->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + This->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); if (!This->hEvent) return FALSE; @@ -243,10 +245,10 @@ static BOOL CreateRenderingSubsystem(VideoRendererImpl* This) } WaitForSingleObject(This->hEvent, INFINITE); - CloseHandle(This->hEvent); if (!This->ThreadResult) { + CloseHandle(This->hEvent); CloseHandle(This->hThread); return FALSE; } @@ -411,13 +413,19 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) } #endif + SetEvent(This->hEvent); if (This->state == State_Paused) { - if (This->sample_held) - IMediaSample_Release(This->sample_held); - This->sample_held = pSample; - IMediaSample_AddRef(pSample); + LeaveCriticalSection(&This->csFilter); + WaitForSingleObject(This->blocked, INFINITE); + EnterCriticalSection(&This->csFilter); + This->sample_held = NULL; + if (This->state == State_Paused) + /* Flushing */ + return S_OK; + if (This->state == State_Stopped) + return VFW_E_WRONG_STATE; } if (This->pClock && This->state == State_Running) @@ -611,7 +619,14 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) if (!CreateRenderingSubsystem(pVideoRenderer)) return E_FAIL; - + + pVideoRenderer->blocked = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!pVideoRenderer->blocked) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + IUnknown_Release((IUnknown *)pVideoRenderer); + } + return hr; } @@ -683,6 +698,7 @@ static ULONG WINAPI VideoRendererInner_Release(IUnknown * iface) PostThreadMessageA(This->ThreadID, WM_QUIT, 0, 0); WaitForSingleObject(This->hThread, INFINITE); CloseHandle(This->hThread); + CloseHandle(This->hEvent); if (This->pClock) IReferenceClock_Release(This->pClock); @@ -789,12 +805,8 @@ static HRESULT WINAPI VideoRenderer_Stop(IBaseFilter * iface) EnterCriticalSection(&This->csFilter); { This->state = State_Stopped; - - if (This->sample_held) - { - IMediaSample_Release(This->sample_held); - This->sample_held = NULL; - } + SetEvent(This->hEvent); + SetEvent(This->blocked); } LeaveCriticalSection(&This->csFilter); @@ -808,11 +820,16 @@ static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter * iface) TRACE("(%p/%p)->()\n", This, iface); EnterCriticalSection(&This->csFilter); + if (This->state != State_Paused) { if (This->state == State_Stopped) + { This->pInputPin->end_of_stream = 0; + ResetEvent(This->hEvent); + } This->state = State_Paused; + ResetEvent(This->blocked); } LeaveCriticalSection(&This->csFilter); @@ -829,16 +846,14 @@ static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tSta if (This->state != State_Running) { if (This->state == State_Stopped) + { This->pInputPin->end_of_stream = 0; + ResetEvent(This->hEvent); + } + SetEvent(This->blocked); This->rtStreamStart = tStart; This->state = State_Running; - - if (This->sample_held) - { - IMediaSample_Release(This->sample_held); - This->sample_held = NULL; - } } LeaveCriticalSection(&This->csFilter); @@ -848,16 +863,22 @@ static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tSta static HRESULT WINAPI VideoRenderer_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) { VideoRendererImpl *This = (VideoRendererImpl *)iface; + HRESULT hr; TRACE("(%p/%p)->(%d, %p)\n", This, iface, dwMilliSecsTimeout, pState); + if (WaitForSingleObject(This->hEvent, dwMilliSecsTimeout) == WAIT_TIMEOUT) + hr = VFW_S_STATE_INTERMEDIATE; + else + hr = S_OK; + EnterCriticalSection(&This->csFilter); { *pState = This->state; } LeaveCriticalSection(&This->csFilter); - return S_OK; + return hr; } static HRESULT WINAPI VideoRenderer_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) @@ -1013,6 +1034,42 @@ static HRESULT WINAPI VideoRenderer_InputPin_EndOfStream(IPin * iface) return hr; } +static HRESULT WINAPI VideoRenderer_InputPin_BeginFlush(IPin * iface) +{ + InputPin* This = (InputPin*)iface; + VideoRendererImpl *pVideoRenderer = (VideoRendererImpl *)This->pin.pinInfo.pFilter; + HRESULT hr; + + TRACE("(%p/%p)->()\n", This, iface); + + EnterCriticalSection(This->pin.pCritSec); + if (pVideoRenderer->state == State_Paused) + SetEvent(pVideoRenderer->blocked); + + hr = InputPin_BeginFlush(iface); + LeaveCriticalSection(This->pin.pCritSec); + + return hr; +} + +static HRESULT WINAPI VideoRenderer_InputPin_EndFlush(IPin * iface) +{ + InputPin* This = (InputPin*)iface; + VideoRendererImpl *pVideoRenderer = (VideoRendererImpl *)This->pin.pinInfo.pFilter; + HRESULT hr; + + TRACE("(%p/%p)->()\n", This, iface); + + EnterCriticalSection(This->pin.pCritSec); + if (pVideoRenderer->state == State_Paused) + ResetEvent(pVideoRenderer->blocked); + + hr = InputPin_EndFlush(iface); + LeaveCriticalSection(This->pin.pCritSec); + + return hr; +} + static const IPinVtbl VideoRenderer_InputPin_Vtbl = { InputPin_QueryInterface, @@ -1030,8 +1087,8 @@ static const IPinVtbl VideoRenderer_InputPin_Vtbl = IPinImpl_EnumMediaTypes, IPinImpl_QueryInternalConnections, VideoRenderer_InputPin_EndOfStream, - InputPin_BeginFlush, - InputPin_EndFlush, + VideoRenderer_InputPin_BeginFlush, + VideoRenderer_InputPin_EndFlush, InputPin_NewSegment };
1
0
0
0
Maarten Lankhorst : quartz: Implement state transitions in directsound renderer, and block on pause.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: b6b67f698a193d3c076c42dc0e3a186631e547f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6b67f698a193d3c076c42dc0…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 00:09:07 2008 -0700 quartz: Implement state transitions in directsound renderer, and block on pause. --- dlls/quartz/dsoundrender.c | 81 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 78 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index e81acfb..9e6e7ed 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -73,6 +73,8 @@ typedef struct DSoundRenderImpl REFERENCE_TIME play_time; MediaSeekingImpl mediaSeeking; + HANDLE state_change, blocked; + long volume; long pan; } DSoundRenderImpl; @@ -246,6 +248,8 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) if (This->state == State_Stopped) return VFW_E_WRONG_STATE; + SetEvent(This->state_change); + hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) { @@ -270,7 +274,19 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) } if (This->state == State_Paused) - return S_OK; + { + LeaveCriticalSection(&This->csFilter); + WaitForSingleObject(This->blocked, INFINITE); + EnterCriticalSection(&This->csFilter); + if (This->state == State_Stopped) + return VFW_E_WRONG_STATE; + + if (This->state == State_Paused) + { + /* Assuming we return because of flushing */ + return S_OK; + } + } cbSrcStream = IMediaSample_GetActualDataLength(pSample); TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream); @@ -359,6 +375,15 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) MediaSeekingImpl_Init((IBaseFilter*)pDSoundRender, sound_mod_stop, sound_mod_start, sound_mod_rate, &pDSoundRender->mediaSeeking, &pDSoundRender->csFilter); pDSoundRender->mediaSeeking.lpVtbl = &IMediaSeeking_Vtbl; + pDSoundRender->state_change = CreateEventW(NULL, TRUE, TRUE, NULL); + pDSoundRender->blocked = CreateEventW(NULL, FALSE, FALSE, NULL); + + if (!pDSoundRender->state_change || !pDSoundRender->blocked) + { + IUnknown_Release((IUnknown *)pDSoundRender); + return HRESULT_FROM_WIN32(GetLastError()); + } + *ppv = (LPVOID)pDSoundRender; } else @@ -453,6 +478,9 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface) This->csFilter.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->csFilter); + CloseHandle(This->state_change); + CloseHandle(This->blocked); + TRACE("Destroying Audio Renderer\n"); CoTaskMemFree(This); @@ -497,6 +525,10 @@ static HRESULT WINAPI DSoundRender_Stop(IBaseFilter * iface) } if (SUCCEEDED(hr)) This->state = State_Stopped; + + /* Complete our transition */ + SetEvent(This->state_change); + SetEvent(This->blocked); } LeaveCriticalSection(&This->csFilter); @@ -511,10 +543,13 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface) TRACE("(%p/%p)->()\n", This, iface); EnterCriticalSection(&This->csFilter); + if (This->state != State_Paused) { DWORD state = 0; if (This->state == State_Stopped) + { This->pInputPin->end_of_stream = 0; + } if (This->dsbuffer) { @@ -527,6 +562,9 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface) } if (SUCCEEDED(hr)) This->state = State_Paused; + + ResetEvent(This->blocked); + ResetEvent(This->state_change); } LeaveCriticalSection(&This->csFilter); @@ -543,8 +581,18 @@ static HRESULT WINAPI DSoundRender_Run(IBaseFilter * iface, REFERENCE_TIME tStar EnterCriticalSection(&This->csFilter); { This->rtStreamStart = tStart; + if (This->state == State_Paused) + { + /* Unblock our thread, state changing from paused to running doesn't need a reset for state change */ + SetEvent(This->blocked); + } + else if (This->state == State_Stopped) + { + ResetEvent(This->state_change); + This->pInputPin->end_of_stream = 0; + } + This->state = State_Running; - This->pInputPin->end_of_stream = 0; } LeaveCriticalSection(&This->csFilter); @@ -553,10 +601,16 @@ static HRESULT WINAPI DSoundRender_Run(IBaseFilter * iface, REFERENCE_TIME tStar static HRESULT WINAPI DSoundRender_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) { + HRESULT hr; DSoundRenderImpl *This = (DSoundRenderImpl *)iface; TRACE("(%p/%p)->(%d, %p)\n", This, iface, dwMilliSecsTimeout, pState); + if (WaitForSingleObject(This->state_change, dwMilliSecsTimeout) == WAIT_TIMEOUT) + hr = VFW_S_STATE_INTERMEDIATE; + else + hr = S_OK; + EnterCriticalSection(&This->csFilter); { *pState = This->state; @@ -866,6 +920,27 @@ static HRESULT WINAPI DSoundRender_InputPin_BeginFlush(IPin * iface) memset(buffer, 0, size); IDirectSoundBuffer_Unlock(pFilter->dsbuffer, buffer, size, NULL, 0); } + + if (pFilter->state == State_Paused) + SetEvent(pFilter->blocked); + LeaveCriticalSection(This->pin.pCritSec); + + return hr; +} + +static HRESULT WINAPI DSoundRender_InputPin_EndFlush(IPin * iface) +{ + InputPin *This = (InputPin *)iface; + DSoundRenderImpl *pFilter = (DSoundRenderImpl *)This->pin.pinInfo.pFilter; + HRESULT hr; + + TRACE("\n"); + + EnterCriticalSection(This->pin.pCritSec); + hr = InputPin_EndFlush(iface); + + if (pFilter->state == State_Paused) + SetEvent(pFilter->blocked); LeaveCriticalSection(This->pin.pCritSec); return hr; @@ -889,7 +964,7 @@ static const IPinVtbl DSoundRender_InputPin_Vtbl = IPinImpl_QueryInternalConnections, DSoundRender_InputPin_EndOfStream, DSoundRender_InputPin_BeginFlush, - InputPin_EndFlush, + DSoundRender_InputPin_EndFlush, InputPin_NewSegment };
1
0
0
0
Rob Shearman : rpcrt4: Don' t reserve space in the buffer for reference pointers embedded in complex types .
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 620d783680cc1b867da348500a0f4f5c6b441d42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=620d783680cc1b867da348500…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Jul 3 23:28:02 2008 +0100 rpcrt4: Don't reserve space in the buffer for reference pointers embedded in complex types. Ref pointers don't need a pointer ID and reserving space would render the code incompatible with other clients. Note that the pointer marshalling/unmarshalling functions didn't actually read/write pointer IDs to/from the reserved space in the buffer. --- dlls/rpcrt4/ndr_marshall.c | 53 ++++++++++++++++++++----------------------- 1 files changed, 25 insertions(+), 28 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 3b4f332..4dcd500 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2253,7 +2253,9 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; TRACE("pointer=%p <= %p\n", *(unsigned char**)pMemory, pMemory); - ALIGN_POINTER_CLEAR(pStubMsg->Buffer, 4); + TRACE("pStubMsg->Buffer before %p\n", pStubMsg->Buffer); + if (*pPointer != RPC_FC_RP) + ALIGN_POINTER_CLEAR(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; if (pStubMsg->PointerBufferMark) { @@ -2261,21 +2263,18 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->PointerBufferMark = NULL; pointer_buffer_mark_set = 1; } - else + else if (*pPointer != RPC_FC_RP) safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ PointerMarshall(pStubMsg, saved_buffer, *(unsigned char**)pMemory, pPointer); if (pointer_buffer_mark_set) { STD_OVERFLOW_CHECK(pStubMsg); pStubMsg->PointerBufferMark = pStubMsg->Buffer; - if (saved_buffer + 4 > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) - { - ERR("buffer overflow - saved_buffer = %p, BufferEnd = %p\n", - saved_buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - pStubMsg->Buffer = saved_buffer + 4; + pStubMsg->Buffer = saved_buffer; + if (*pPointer != RPC_FC_RP) + safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } + TRACE("pStubMsg->Buffer after %p\n", pStubMsg->Buffer); pPointer += 4; pMemory += 4; break; @@ -2380,7 +2379,8 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; TRACE("pointer => %p\n", pMemory); - ALIGN_POINTER(pStubMsg->Buffer, 4); + if (*pPointer != RPC_FC_RP) + ALIGN_POINTER(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; if (pStubMsg->PointerBufferMark) { @@ -2388,7 +2388,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->PointerBufferMark = NULL; pointer_buffer_mark_set = 1; } - else + else if (*pPointer != RPC_FC_RP) safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ PointerUnmarshall(pStubMsg, saved_buffer, (unsigned char**)pMemory, *(unsigned char**)pMemory, pPointer, fMustAlloc); @@ -2396,13 +2396,9 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, { STD_OVERFLOW_CHECK(pStubMsg); pStubMsg->PointerBufferMark = pStubMsg->Buffer; - if (saved_buffer + 4 > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) - { - ERR("buffer overflow - saved_buffer = %p, BufferEnd = %p\n", - saved_buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - pStubMsg->Buffer = saved_buffer + 4; + pStubMsg->Buffer = saved_buffer; + if (*pPointer != RPC_FC_RP) + safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } pPointer += 4; pMemory += 4; @@ -2507,7 +2503,11 @@ static unsigned char * ComplexBufferSize(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->PointerLength = pStubMsg->BufferLength; pStubMsg->BufferLength = saved_buffer_length; } - safe_buffer_length_increment(pStubMsg, 4); + if (*pPointer != RPC_FC_RP) + { + ALIGN_LENGTH(pStubMsg->BufferLength, 4); + safe_buffer_length_increment(pStubMsg, 4); + } pPointer += 4; pMemory += 4; break; @@ -2680,7 +2680,8 @@ static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { unsigned char *saved_buffer; int pointer_buffer_mark_set = 0; - ALIGN_POINTER(pStubMsg->Buffer, 4); + if (*pPointer != RPC_FC_RP) + ALIGN_POINTER(pStubMsg->Buffer, 4); saved_buffer = pStubMsg->Buffer; if (pStubMsg->PointerBufferMark) { @@ -2688,7 +2689,7 @@ static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->PointerBufferMark = NULL; pointer_buffer_mark_set = 1; } - else + else if (*pPointer != RPC_FC_RP) safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ if (!pStubMsg->IgnoreEmbeddedPointers) @@ -2697,13 +2698,9 @@ static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { STD_OVERFLOW_CHECK(pStubMsg); pStubMsg->PointerBufferMark = pStubMsg->Buffer; - if (saved_buffer + 4 > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) - { - ERR("buffer overflow - saved_buffer = %p, BufferEnd = %p\n", - saved_buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - pStubMsg->Buffer = saved_buffer + 4; + pStubMsg->Buffer = saved_buffer; + if (*pPointer != RPC_FC_RP) + safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ } pPointer += 4; size += 4;
1
0
0
0
Rob Shearman : rpcrt4: Implement memory sizing for pointers in complex types.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 5887be5717eddbc4493accf8c66c0e739790cbc2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5887be5717eddbc4493accf8c…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Jul 3 23:27:14 2008 +0100 rpcrt4: Implement memory sizing for pointers in complex types. --- dlls/rpcrt4/ndr_marshall.c | 45 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 41d5f31..3b4f332 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2641,7 +2641,8 @@ static unsigned char * ComplexFree(PMIDL_STUB_MESSAGE pStubMsg, } static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, - PFORMAT_STRING pFormat) + PFORMAT_STRING pFormat, + PFORMAT_STRING pPointer) { PFORMAT_STRING desc; unsigned long size = 0; @@ -2676,11 +2677,38 @@ static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, safe_buffer_increment(pStubMsg, 8); break; case RPC_FC_POINTER: - size += 4; - safe_buffer_increment(pStubMsg, 4); + { + unsigned char *saved_buffer; + int pointer_buffer_mark_set = 0; + ALIGN_POINTER(pStubMsg->Buffer, 4); + saved_buffer = pStubMsg->Buffer; + if (pStubMsg->PointerBufferMark) + { + pStubMsg->Buffer = pStubMsg->PointerBufferMark; + pStubMsg->PointerBufferMark = NULL; + pointer_buffer_mark_set = 1; + } + else + safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ + if (!pStubMsg->IgnoreEmbeddedPointers) - FIXME("embedded pointers\n"); + PointerMemorySize(pStubMsg, saved_buffer, pPointer); + if (pointer_buffer_mark_set) + { + STD_OVERFLOW_CHECK(pStubMsg); + pStubMsg->PointerBufferMark = pStubMsg->Buffer; + if (saved_buffer + 4 > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) + { + ERR("buffer overflow - saved_buffer = %p, BufferEnd = %p\n", + saved_buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); + RpcRaiseException(RPC_X_BAD_STUB_DATA); + } + pStubMsg->Buffer = saved_buffer + 4; + } + pPointer += 4; + size += 4; break; + } case RPC_FC_ALIGNM4: ALIGN_LENGTH(size, 4); ALIGN_POINTER(pStubMsg->Buffer, 4); @@ -2973,6 +3001,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { unsigned size = *(const WORD*)(pFormat+2); PFORMAT_STRING conf_array = NULL; + PFORMAT_STRING pointer_desc = NULL; TRACE("(%p,%p)\n", pStubMsg, pFormat); @@ -2980,9 +3009,11 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pFormat += 4; if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; - pFormat += 4; + pFormat += 2; + if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; + pFormat += 2; - ComplexStructMemorySize(pStubMsg, pFormat); + ComplexStructMemorySize(pStubMsg, pFormat, pointer_desc); if (conf_array) NdrConformantArrayMemorySize(pStubMsg, conf_array); @@ -3596,7 +3627,7 @@ ULONG WINAPI NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, count = pStubMsg->ActualCount; for (i = 0; i < count; i++) - ComplexStructMemorySize(pStubMsg, pFormat); + ComplexStructMemorySize(pStubMsg, pFormat, NULL); pStubMsg->MemorySize = SavedMemorySize;
1
0
0
0
Rob Shearman : rpcrt4: The conformant array offset in complex structs should be signed.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 81b4436addfe02eb9f4f68a5cec877a2103a9b76 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81b4436addfe02eb9f4f68a5c…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Jul 3 23:27:00 2008 +0100 rpcrt4: The conformant array offset in complex structs should be signed. --- dlls/rpcrt4/ndr_marshall.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index c044ace..41d5f31 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2819,7 +2819,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, ALIGN_POINTER_CLEAR(pStubMsg->Buffer, pFormat[1] + 1); pFormat += 4; - if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; + if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; pFormat += 2; if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2; @@ -2887,7 +2887,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, *ppMemory = NdrAllocate(pStubMsg, size); pFormat += 4; - if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; + if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; pFormat += 2; if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2; @@ -2943,7 +2943,7 @@ void WINAPI NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, } pFormat += 4; - if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; + if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; pFormat += 2; if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2; @@ -2979,7 +2979,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, ALIGN_POINTER(pStubMsg->Buffer, pFormat[1] + 1); pFormat += 4; - if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; + if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; pFormat += 4; ComplexStructMemorySize(pStubMsg, pFormat); @@ -3004,7 +3004,7 @@ void WINAPI NdrComplexStructFree(PMIDL_STUB_MESSAGE pStubMsg, TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); pFormat += 4; - if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; + if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat; pFormat += 2; if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2;
1
0
0
0
Rob Shearman : rpcrt4: Fix NdrComplexArrayUnmarshall and NdrComplexStructUnmarshall to reuse memory for embedded pointers .
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 44649e855a4a4b193f33ce4387b505d50529305d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44649e855a4a4b193f33ce438…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Jun 26 08:50:53 2008 +0100 rpcrt4: Fix NdrComplexArrayUnmarshall and NdrComplexStructUnmarshall to reuse memory for embedded pointers. --- dlls/rpcrt4/ndr_marshall.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 1501402..c044ace 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2331,7 +2331,8 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg, static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat, - PFORMAT_STRING pPointer) + PFORMAT_STRING pPointer, + unsigned char fMustAlloc) { PFORMAT_STRING desc; NDR_UNMARSHALL m; @@ -2390,7 +2391,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, else safe_buffer_increment(pStubMsg, 4); /* for pointer ID */ - PointerUnmarshall(pStubMsg, saved_buffer, (unsigned char**)pMemory, *(unsigned char**)pMemory, pPointer, TRUE); + PointerUnmarshall(pStubMsg, saved_buffer, (unsigned char**)pMemory, *(unsigned char**)pMemory, pPointer, fMustAlloc); if (pointer_buffer_mark_set) { STD_OVERFLOW_CHECK(pStubMsg); @@ -2430,7 +2431,6 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, size = EmbeddedComplexSize(pStubMsg, desc); TRACE("embedded complex (size=%ld) => %p\n", size, pMemory); m = NdrUnmarshaller[*desc & NDR_TABLE_MASK]; - memset(pMemory, 0, size); /* just in case */ if (m) { /* for some reason interface pointers aren't generated as @@ -2884,10 +2884,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, ALIGN_POINTER(pStubMsg->Buffer, pFormat[1] + 1); if (fMustAlloc || !*ppMemory) - { *ppMemory = NdrAllocate(pStubMsg, size); - memset(*ppMemory, 0, size); - } pFormat += 4; if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; @@ -2895,7 +2892,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; pFormat += 2; - pMemory = ComplexUnmarshall(pStubMsg, *ppMemory, pFormat, pointer_desc); + pMemory = ComplexUnmarshall(pStubMsg, *ppMemory, pFormat, pointer_desc, fMustAlloc); if (conf_array) NdrConformantArrayUnmarshall(pStubMsg, &pMemory, conf_array, fMustAlloc); @@ -3470,17 +3467,14 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, pFormat = ReadVariance(pStubMsg, pFormat, pStubMsg->MaxCount); if (fMustAlloc || !*ppMemory) - { *ppMemory = NdrAllocate(pStubMsg, size); - memset(*ppMemory, 0, size); - } ALIGN_POINTER(pStubMsg->Buffer, alignment); pMemory = *ppMemory; count = pStubMsg->ActualCount; for (i = 0; i < count; i++) - pMemory = ComplexUnmarshall(pStubMsg, pMemory, pFormat, NULL); + pMemory = ComplexUnmarshall(pStubMsg, pMemory, pFormat, NULL, fMustAlloc); if (pointer_buffer_mark_set) {
1
0
0
0
Rob Shearman : rpcrt4: Support calculating the size in memory of range types embedded in complex types .
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 517844e054039bbd1aff0a8911051a7f1ffa59c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=517844e054039bbd1aff0a891…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Jul 3 23:26:43 2008 +0100 rpcrt4: Support calculating the size in memory of range types embedded in complex types. --- dlls/rpcrt4/ndr_marshall.c | 52 ++++++++++++++++++++++++++++++++++--------- 1 files changed, 41 insertions(+), 11 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 4e7643a..1501402 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2114,7 +2114,17 @@ void WINAPI NdrSimpleStructFree(PMIDL_STUB_MESSAGE pStubMsg, } -static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg, +#include "pshpack1.h" +typedef struct +{ + unsigned char type; + unsigned char flags_type; /* flags in upper nibble, type in lower nibble */ + ULONG low_value; + ULONG high_value; +} NDR_RANGE; +#include "poppack.h" + +static unsigned long EmbeddedComplexSize(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat) { switch (*pFormat) { @@ -2128,6 +2138,36 @@ static unsigned long EmbeddedComplexSize(const MIDL_STUB_MESSAGE *pStubMsg, return *(const WORD*)&pFormat[2]; case RPC_FC_USER_MARSHAL: return *(const WORD*)&pFormat[4]; + case RPC_FC_RANGE: { + switch (((const NDR_RANGE *)pFormat)->flags_type & 0xf) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + return sizeof(UCHAR); + case RPC_FC_WCHAR: + case RPC_FC_SHORT: + case RPC_FC_USHORT: + return sizeof(USHORT); + case RPC_FC_LONG: + case RPC_FC_ULONG: + case RPC_FC_ENUM32: + return sizeof(ULONG); + case RPC_FC_FLOAT: + return sizeof(float); + case RPC_FC_DOUBLE: + return sizeof(double); + case RPC_FC_HYPER: + return sizeof(ULONGLONG); + case RPC_FC_ERROR_STATUS_T: + return sizeof(error_status_t); + case RPC_FC_ENUM16: + return sizeof(UINT); + default: + ERR("unknown type 0x%x\n", ((const NDR_RANGE *)pFormat)->flags_type & 0xf); + RpcRaiseException(RPC_X_BAD_STUB_DATA); + } + } case RPC_FC_NON_ENCAPSULATED_UNION: pFormat += 2; if (pStubMsg->fHasNewCorrDesc) @@ -5710,16 +5750,6 @@ void WINAPI NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE pStubMsg, FIXME("stub\n"); } -#include "pshpack1.h" -typedef struct -{ - unsigned char type; - unsigned char flags_type; /* flags in upper nibble, type in lower nibble */ - ULONG low_value; - ULONG high_value; -} NDR_RANGE; -#include "poppack.h" - /*********************************************************************** * NdrRangeMarshall [internal] */
1
0
0
0
Dylan Smith : comctl32: Fix for ComboBoxEx bug caused by focus change.
by Alexandre Julliard
04 Jul '08
04 Jul '08
Module: wine Branch: master Commit: 798afcf902071d14a71e3855e3a6b3732d778019 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=798afcf902071d14a71e3855e…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Jul 3 11:37:14 2008 -0400 comctl32: Fix for ComboBoxEx bug caused by focus change. --- dlls/comctl32/comboex.c | 3 +++ dlls/comctl32/tests/comboex.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 664d0a2..afd4f82 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -1267,6 +1267,9 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lPa InvalidateRect (infoPtr->hwndCombo, 0, 0); return 0; + case CBN_SETFOCUS: + return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf); + default: /* * We have to change the handle since we are the control diff --git a/dlls/comctl32/tests/comboex.c b/dlls/comctl32/tests/comboex.c index dbd9c6e..eca7ca4 100644 --- a/dlls/comctl32/tests/comboex.c +++ b/dlls/comctl32/tests/comboex.c @@ -221,7 +221,7 @@ static void test_WM_LBUTTONDOWN(void) result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", GetLastError()); - todo_wine ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo, "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), @@ -232,7 +232,7 @@ static void test_WM_LBUTTONDOWN(void) result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); - todo_wine ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo, "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); @@ -244,23 +244,23 @@ static void test_WM_LBUTTONDOWN(void) result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", GetLastError()); - todo_wine ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo, "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", GetLastError()); - todo_wine ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo, "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); - todo_wine ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), + ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), "The dropdown list should still be visible.\n"); result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); - ok(GetFocus() == hEdit, + todo_wine ok(GetFocus() == hEdit, "Focus not on ComboBoxEx's Edit Control, instead on %p\n", GetFocus()); ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0),
1
0
0
0
← Newer
1
...
92
93
94
95
96
97
98
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200