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
May 2012
----- 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
2 participants
737 discussions
Start a n
N
ew thread
Vincent Povirk : propsys: Implement IPropertyStore::GetAt.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 0ba11e8970697ff32684fcc716565dd395d7c5ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ba11e8970697ff32684fcc71…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue May 22 15:34:25 2012 -0500 propsys: Implement IPropertyStore::GetAt. --- dlls/propsys/propstore.c | 47 ++++++++++++++++++++++++++++++++++++++- dlls/propsys/tests/propstore.c | 8 +++--- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/dlls/propsys/propstore.c b/dlls/propsys/propstore.c index b89eb76..a57bb2e 100644 --- a/dlls/propsys/propstore.c +++ b/dlls/propsys/propstore.c @@ -156,8 +156,51 @@ static HRESULT WINAPI PropertyStore_GetCount(IPropertyStoreCache *iface, static HRESULT WINAPI PropertyStore_GetAt(IPropertyStoreCache *iface, DWORD iProp, PROPERTYKEY *pkey) { - FIXME("%p,%d,%p: stub\n", iface, iProp, pkey); - return E_NOTIMPL; + PropertyStore *This = impl_from_IPropertyStoreCache(iface); + propstore_format *format=NULL, *format_candidate; + propstore_value *value; + HRESULT hr; + + TRACE("%p,%d,%p\n", iface, iProp, pkey); + + if (!pkey) + return E_POINTER; + + EnterCriticalSection(&This->lock); + + LIST_FOR_EACH_ENTRY(format_candidate, &This->formats, propstore_format, entry) + { + if (format_candidate->count > iProp) + { + format = format_candidate; + pkey->fmtid = format->fmtid; + break; + } + + iProp -= format_candidate->count; + } + + if (format) + { + LIST_FOR_EACH_ENTRY(value, &format->values, propstore_value, entry) + { + if (iProp == 0) + { + pkey->pid = value->pid; + break; + } + + iProp--; + } + + hr = S_OK; + } + else + hr = E_INVALIDARG; + + LeaveCriticalSection(&This->lock); + + return hr; } static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, diff --git a/dlls/propsys/tests/propstore.c b/dlls/propsys/tests/propstore.c index 6ca67e9..7915b96 100644 --- a/dlls/propsys/tests/propstore.c +++ b/dlls/propsys/tests/propstore.c @@ -68,7 +68,7 @@ static void test_inmemorystore(void) ok(hr == S_OK, "Commit failed, hr=%x\n", hr); hr = IPropertyStoreCache_GetAt(propcache, 0, &pkey); - todo_wine ok(hr == E_INVALIDARG, "GetAt failed, hr=%x\n", hr); + ok(hr == E_INVALIDARG, "GetAt failed, hr=%x\n", hr); pkey.fmtid = PKEY_WineTest; pkey.pid = 4; @@ -97,9 +97,9 @@ static void test_inmemorystore(void) memset(&pkey, 0, sizeof(pkey)); hr = IPropertyStoreCache_GetAt(propcache, 0, &pkey); - todo_wine ok(hr == S_OK, "GetAt failed, hr=%x\n", hr); - todo_wine ok(IsEqualGUID(&pkey.fmtid, &PKEY_WineTest), "got wrong pkey\n"); - todo_wine ok(pkey.pid == 4, "got pid of %i, expected 4\n", pkey.pid); + ok(hr == S_OK, "GetAt failed, hr=%x\n", hr); + ok(IsEqualGUID(&pkey.fmtid, &PKEY_WineTest), "got wrong pkey\n"); + ok(pkey.pid == 4, "got pid of %i, expected 4\n", pkey.pid); pkey.fmtid = PKEY_WineTest; pkey.pid = 4;
1
0
0
0
Aric Stewart : quartz: COM cleanup for ParserImpl.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 11f24690d581f24be9b2c4e0c3b2bbd29e85a79e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11f24690d581f24be9b2c4e0c…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 21 08:21:48 2012 -0500 quartz: COM cleanup for ParserImpl. --- dlls/quartz/parser.c | 58 +++++++++++++++++++++++++++++-------------------- 1 files changed, 34 insertions(+), 24 deletions(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 9b33e05..da9b4b1 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -53,10 +53,20 @@ static inline ParserImpl *impl_from_IMediaSeeking( IMediaSeeking *iface ) return CONTAINING_RECORD(iface, ParserImpl, sourceSeeking.IMediaSeeking_iface); } +static inline ParserImpl *impl_from_IBaseFilter( IBaseFilter *iface ) +{ + return CONTAINING_RECORD(iface, ParserImpl, filter.IBaseFilter_iface); +} + +static inline ParserImpl *impl_from_BaseFilter( BaseFilter *iface ) +{ + return CONTAINING_RECORD(iface, ParserImpl, filter); +} + /* FIXME: WRONG */ static IPin* WINAPI Parser_GetPin(BaseFilter *iface, int pos) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_BaseFilter(iface); TRACE("Asking for pos %x\n", pos); @@ -70,7 +80,7 @@ static IPin* WINAPI Parser_GetPin(BaseFilter *iface, int pos) static LONG WINAPI Parser_GetPinCount(BaseFilter *iface) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_BaseFilter(iface); return This->cStreams; } @@ -95,7 +105,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c /* construct input pin */ piInput.dir = PINDIR_INPUT; - piInput.pFilter = (IBaseFilter *)pParser; + piInput.pFilter = &pParser->filter.IBaseFilter_iface; lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0])); if (!start) @@ -119,7 +129,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c else { CoTaskMemFree(pParser->ppPins); - BaseFilterImpl_Release((IBaseFilter*)pParser); + BaseFilterImpl_Release(&pParser->filter.IBaseFilter_iface); CoTaskMemFree(pParser); } @@ -128,7 +138,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); TRACE("(%s, %p)\n", qzdebugstr_guid(riid), ppv); *ppv = NULL; @@ -191,7 +201,7 @@ void Parser_Destroy(ParserImpl *This) ULONG WINAPI Parser_Release(IBaseFilter * iface) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); ULONG refCount = BaseFilterImpl_Release(iface); TRACE("(%p)->() Release from %d\n", This, refCount + 1); @@ -206,7 +216,7 @@ ULONG WINAPI Parser_Release(IBaseFilter * iface) HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); TRACE("(%p)\n", pClsid); @@ -219,7 +229,7 @@ HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid) HRESULT WINAPI Parser_Stop(IBaseFilter * iface) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); PullPin *pin = impl_PullPin_from_IPin(This->ppPins[0]); ULONG i; @@ -258,7 +268,7 @@ HRESULT WINAPI Parser_Stop(IBaseFilter * iface) HRESULT WINAPI Parser_Pause(IBaseFilter * iface) { HRESULT hr = S_OK; - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); PullPin *pin = impl_PullPin_from_IPin(This->ppPins[0]); TRACE("()\n"); @@ -292,7 +302,7 @@ HRESULT WINAPI Parser_Pause(IBaseFilter * iface) HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart) { HRESULT hr = S_OK; - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); PullPin *pin = impl_PullPin_from_IPin(This->ppPins[0]); ULONG i; @@ -339,7 +349,7 @@ HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart) HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); PullPin *pin = impl_PullPin_from_IPin(This->ppPins[0]); HRESULT hr = S_OK; @@ -361,7 +371,7 @@ HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FI HRESULT WINAPI Parser_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) { - ParserImpl *This = (ParserImpl *)iface; + ParserImpl *This = impl_from_IBaseFilter(iface); PullPin *pin = impl_PullPin_from_IPin(This->ppPins[0]); TRACE("(%p)\n", pClock); @@ -445,7 +455,7 @@ HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PR pin->pin.pin.pinInfo.pFilter = (LPVOID)This; pin->allocProps = *props; This->cStreams++; - BaseFilterImpl_IncrementPinVersion((BaseFilter*)This); + BaseFilterImpl_IncrementPinVersion(&This->filter); CoTaskMemFree(ppOldPins); } else @@ -478,7 +488,7 @@ static HRESULT Parser_RemoveOutputPins(ParserImpl * This) IPin_Release(ppOldPins[i + 1]); } - BaseFilterImpl_IncrementPinVersion((BaseFilter*)This); + BaseFilterImpl_IncrementPinVersion(&This->filter); This->cStreams = 0; CoTaskMemFree(ppOldPins); @@ -551,7 +561,7 @@ static const IMediaSeekingVtbl Parser_Seeking_Vtbl = static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = (Parser_OutputPin*)iface; ALLOCATOR_PROPERTIES actual; if (ppropInputRequest->cbAlign && ppropInputRequest->cbAlign != This->allocProps.cbAlign) @@ -568,7 +578,7 @@ static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface, IM static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = (Parser_OutputPin*)iface; if (iPosition < 0) return E_INVALIDARG; if (iPosition > 0) @@ -579,7 +589,7 @@ static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPositio static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *iface, IMemInputPin *pPin, IMemAllocator **pAlloc) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = (Parser_OutputPin*)iface; HRESULT hr; *pAlloc = NULL; @@ -604,7 +614,7 @@ static HRESULT WINAPI Parser_OutputPin_BreakConnect(BaseOutputPin *This) else { hr = IPin_Disconnect(This->pin.pConnectedTo); - IPin_Disconnect((IPin *)This); + IPin_Disconnect(&This->pin.IPin_iface); } LeaveCriticalSection(This->pin.pCritSec); @@ -626,7 +636,7 @@ static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, *ppv = iface; /* The Parser filter does not support querying IMediaSeeking, return it directly */ else if (IsEqualIID(riid, &IID_IMediaSeeking)) - *ppv = &((ParserImpl*)This->pin.pin.pinInfo.pFilter)->sourceSeeking; + *ppv = &impl_from_IBaseFilter(This->pin.pin.pinInfo.pFilter)->sourceSeeking; if (*ppv) { @@ -660,7 +670,7 @@ static ULONG WINAPI Parser_OutputPin_Release(IPin * iface) static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); - ParserImpl *parser = (ParserImpl *)This->pin.pin.pinInfo.pFilter; + ParserImpl *parser = impl_from_IBaseFilter(This->pin.pin.pinInfo.pFilter); /* Set the allocator to our input pin's */ EnterCriticalSection(This->pin.pin.pCritSec); @@ -716,7 +726,7 @@ static HRESULT WINAPI Parser_PullPin_QueryInterface(IPin * iface, REFIID riid, L * querying IMediaSeeking */ if (IsEqualIID(riid, &IID_IMediaSeeking)) - *ppv = &((ParserImpl*)This->pin.pinInfo.pFilter)->sourceSeeking; + *ppv = &impl_from_IBaseFilter(This->pin.pinInfo.pFilter)->sourceSeeking; if (*ppv) { @@ -740,7 +750,7 @@ static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface) if (This->pin.pConnectedTo) { FILTER_STATE state; - ParserImpl *Parser = (ParserImpl *)This->pin.pinInfo.pFilter; + ParserImpl *Parser = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); LeaveCriticalSection(This->pin.pCritSec); hr = IBaseFilter_GetState(This->pin.pinInfo.pFilter, INFINITE, &state); @@ -751,7 +761,7 @@ static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface) LeaveCriticalSection(This->pin.pCritSec); PullPin_Disconnect(iface); EnterCriticalSection(This->pin.pCritSec); - hr = Parser_RemoveOutputPins((ParserImpl *)This->pin.pinInfo.pFilter); + hr = Parser_RemoveOutputPins(impl_from_IBaseFilter(This->pin.pinInfo.pFilter)); } else hr = VFW_E_NOT_STOPPED; @@ -777,7 +787,7 @@ static HRESULT WINAPI Parser_PullPin_ReceiveConnection(IPin * iface, IPin * pRec BasePin *This = (BasePin *)iface; EnterCriticalSection(This->pCritSec); - Parser_RemoveOutputPins((ParserImpl *)This->pinInfo.pFilter); + Parser_RemoveOutputPins(impl_from_IBaseFilter(This->pinInfo.pFilter)); LeaveCriticalSection(This->pCritSec); }
1
0
0
0
Aric Stewart : quartz: COM cleanup for Parser_OutputPin.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 7fab2428c81d477ea5c54f2aaf8896706ba871f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fab2428c81d477ea5c54f2aa…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 21 08:21:41 2012 -0500 quartz: COM cleanup for Parser_OutputPin. --- dlls/quartz/avisplit.c | 8 ++++---- dlls/quartz/mpegsplit.c | 6 +++--- dlls/quartz/parser.c | 10 +++++----- dlls/quartz/parser.h | 6 ++++++ dlls/quartz/waveparser.c | 6 +++--- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 5027e90..3d67a18 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -288,7 +288,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample, DWORD streamnumber) { - Parser_OutputPin *pin = (Parser_OutputPin *)This->Parser.ppPins[1+streamnumber]; + Parser_OutputPin *pin = unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1+streamnumber]); HRESULT hr; LONGLONG start, stop, rtstart, rtstop; StreamData *stream = &This->streams[streamnumber]; @@ -318,7 +318,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample, EnterCriticalSection(&This->Parser.filter.csFilter); pin->pin.pin.tStart = start; pin->pin.pin.dRate = This->Parser.sourceSeeking.dRate; - hr = IPin_ConnectedTo((IPin *)pin, &victim); + hr = IPin_ConnectedTo(&pin->pin.pin.IPin_iface, &victim); if (hr == S_OK) { hr = IPin_NewSegment(victim, start, This->Parser.sourceSeeking.llStop, @@ -337,7 +337,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample, IMediaSample_SetTime(sample, &rtstart, &rtstop); IMediaSample_SetMediaTime(sample, &start, &stop); - hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)&pin->pin, sample); + hr = BaseOutputPinImpl_Deliver(&pin->pin, sample); /* Uncomment this if you want to debug the time differences between the * different streams, it is useful for that @@ -1307,7 +1307,7 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface) EnterCriticalSection(&This->Parser.filter.csFilter); for (x = 0; x < This->Parser.cStreams; ++x) { - Parser_OutputPin *pin = (Parser_OutputPin *)This->Parser.ppPins[1+x]; + Parser_OutputPin *pin = unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1+x]); StreamData *stream = This->streams + x; LONGLONG wanted_frames; DWORD last_keyframe = 0, last_keyframeidx = 0, preroll = 0; diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 008a0a5..585851b 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -169,7 +169,7 @@ static HRESULT parse_header(BYTE *header, LONGLONG *plen, LONGLONG *pduration) static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample) { - Parser_OutputPin * pOutputPin = (Parser_OutputPin*)This->Parser.ppPins[1]; + Parser_OutputPin * pOutputPin = unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1]); LONGLONG length = 0; LONGLONG pos = BYTES_FROM_MEDIATIME(This->Parser.pInputPin->rtNext); LONGLONG time = This->position, rtstop, rtstart; @@ -241,7 +241,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample) EnterCriticalSection(&This->Parser.filter.csFilter); pOutputPin->pin.pin.tStart = time; pOutputPin->pin.pin.dRate = This->Parser.sourceSeeking.dRate; - hr = IPin_ConnectedTo((IPin *)pOutputPin, &victim); + hr = IPin_ConnectedTo(&pOutputPin->pin.pin.IPin_iface, &victim); if (hr == S_OK) { hr = IPin_NewSegment(victim, time, This->Parser.sourceSeeking.llStop, @@ -259,7 +259,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample) IMediaSample_SetTime(pCurrentSample, &rtstart, &rtstop); IMediaSample_SetMediaTime(pCurrentSample, &time, &This->position); - hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)&pOutputPin->pin, pCurrentSample); + hr = BaseOutputPinImpl_Deliver(&pOutputPin->pin, pCurrentSample); if (hr != S_OK) { diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 70a74cb..9b33e05 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -437,7 +437,7 @@ HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PR if (SUCCEEDED(hr)) { IPin *pPin = This->ppPins[This->cStreams + 1]; - Parser_OutputPin *pin = (Parser_OutputPin *)pPin; + Parser_OutputPin *pin = unsafe_impl_Parser_OutputPin_from_IPin(pPin); pin->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); CopyMediaType(pin->pmt, amt); pin->dwSamplesProcessed = 0; @@ -614,7 +614,7 @@ static HRESULT WINAPI Parser_OutputPin_BreakConnect(BaseOutputPin *This) static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); TRACE("(%s, %p)\n", qzdebugstr_guid(riid), ppv); @@ -641,7 +641,7 @@ static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, static ULONG WINAPI Parser_OutputPin_Release(IPin * iface) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount); TRACE("(%p)->() Release from %d\n", iface, refCount + 1); @@ -659,7 +659,7 @@ static ULONG WINAPI Parser_OutputPin_Release(IPin * iface) static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); ParserImpl *parser = (ParserImpl *)This->pin.pin.pinInfo.pFilter; /* Set the allocator to our input pin's */ @@ -672,7 +672,7 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin, static HRESULT WINAPI Parser_OutputPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE * pmt) { - Parser_OutputPin *This = (Parser_OutputPin *)iface; + Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); TRACE("()\n"); dump_AM_MEDIA_TYPE(pmt); diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index 1c210d0..996415a 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -74,3 +74,9 @@ extern HRESULT WINAPI Parser_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppP extern HRESULT WINAPI Parser_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo); extern HRESULT WINAPI Parser_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName); extern HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo); + +/* COM helpers */ +static inline Parser_OutputPin *unsafe_impl_Parser_OutputPin_from_IPin( IPin *iface ) +{ + return CONTAINING_RECORD(iface, Parser_OutputPin, pin.pin.IPin_iface); +} diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 9c84320..113a461 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -103,7 +103,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR return S_OK; } - pOutputPin = (Parser_OutputPin *)This->Parser.ppPins[1]; + pOutputPin = unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1]); if (SUCCEEDED(hr)) hr = IMemAllocator_GetBuffer(pin->pAlloc, &newsample, NULL, NULL, 0); @@ -232,7 +232,7 @@ static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface) } pPin->rtStart = pPin->rtCurrent = bytepos; - ((Parser_OutputPin *)This->Parser.ppPins[1])->dwSamplesProcessed = 0; + unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1])->dwSamplesProcessed = 0; LeaveCriticalSection(&This->Parser.filter.csFilter); TRACE("Done flushing\n"); @@ -371,7 +371,7 @@ static HRESULT WAVEParser_first_request(LPVOID iface) LONGLONG rtSampleStart = pin->rtNext; /* Add 4 for the next header, which should hopefully work */ LONGLONG rtSampleStop = rtSampleStart + MEDIATIME_FROM_BYTES(IMediaSample_GetSize(sample)); - Parser_OutputPin *outpin = (Parser_OutputPin *)This->Parser.ppPins[1]; + Parser_OutputPin *outpin = unsafe_impl_Parser_OutputPin_from_IPin(This->Parser.ppPins[1]); if (rtSampleStop > pin->rtStop) rtSampleStop = MEDIATIME_FROM_BYTES(ALIGNUP(BYTES_FROM_MEDIATIME(pin->rtStop), pin->cbAlign));
1
0
0
0
Henri Verbeet : d3d9: Get rid of the D3DDECLTYPE_INFO typedef.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 8560f36cb8680f20e52f0b12fa21d0b387d5797b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8560f36cb8680f20e52f0b12f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 24 18:27:44 2012 +0200 d3d9: Get rid of the D3DDECLTYPE_INFO typedef. --- dlls/d3d9/vertexdeclaration.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 65d8d18..421f099 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -24,14 +24,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -typedef struct _D3DDECLTYPE_INFO { +static const struct +{ D3DDECLTYPE d3dType; enum wined3d_format_id format; int size; int typesize; -} D3DDECLTYPE_INFO; - -static D3DDECLTYPE_INFO const d3d_dtype_lookup[D3DDECLTYPE_UNUSED] = { +} +d3d_dtype_lookup[] = +{ {D3DDECLTYPE_FLOAT1, WINED3DFMT_R32_FLOAT, 1, sizeof(float)}, {D3DDECLTYPE_FLOAT2, WINED3DFMT_R32G32_FLOAT, 2, sizeof(float)}, {D3DDECLTYPE_FLOAT3, WINED3DFMT_R32G32B32_FLOAT, 3, sizeof(float)},
1
0
0
0
Henri Verbeet : d3d8: Get rid of the wined3d_usage_t typedef.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: d521e6c287f9df2d3329396932890f99272f1468 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d521e6c287f9df2d332939693…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 24 18:27:43 2012 +0200 d3d8: Get rid of the wined3d_usage_t typedef. --- dlls/d3d8/vertexdeclaration.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3d8/vertexdeclaration.c b/dlls/d3d8/vertexdeclaration.c index 3675deb..2277be4 100644 --- a/dlls/d3d8/vertexdeclaration.c +++ b/dlls/d3d8/vertexdeclaration.c @@ -226,12 +226,12 @@ static const enum wined3d_format_id wined3d_format_lookup[] = /*WINED3DDECLTYPE_FLOAT16_4*/ WINED3DFMT_R16G16B16A16_FLOAT, }; -typedef struct { +static const struct +{ BYTE usage; BYTE usage_idx; -} wined3d_usage_t; - -static const wined3d_usage_t wined3d_usage_lookup[] = +} +wined3d_usage_lookup[] = { /* D3DVSDE_POSITION */ {WINED3D_DECL_USAGE_POSITION, 0}, /* D3DVSDE_BLENDWEIGHT */ {WINED3D_DECL_USAGE_BLEND_WEIGHT, 0},
1
0
0
0
Henri Verbeet : ddraw/tests: Add test_wndproc() for the other ddraw versions as well.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 4bf45eca234b9ea62456e32b579b8f83f6f44784 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bf45eca234b9ea62456e32b5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 24 18:27:42 2012 +0200 ddraw/tests: Add test_wndproc() for the other ddraw versions as well. --- dlls/ddraw/tests/ddraw1.c | 158 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 158 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 158 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 474 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4bf45eca234b9ea62456e…
1
0
0
0
Henri Verbeet : ddraw/tests: Move test_wndproc() to ddraw7.c.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: ef03ac0005d0f4c4479424be57cef9d27f0839d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef03ac0005d0f4c4479424be5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 24 18:27:41 2012 +0200 ddraw/tests: Move test_wndproc() to ddraw7.c. --- dlls/ddraw/tests/d3d.c | 235 --------------------------------------------- dlls/ddraw/tests/ddraw7.c | 158 ++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 235 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ef03ac0005d0f4c447942…
1
0
0
0
Henri Verbeet : ddraw: Only initially enable color keying for version 1 devices.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 4905773bafc63b748d2e780c7c331f46f39ecd44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4905773bafc63b748d2e780c7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 24 18:27:40 2012 +0200 ddraw: Only initially enable color keying for version 1 devices. --- dlls/ddraw/device.c | 2 ++ dlls/ddraw/executebuffer.c | 6 +----- dlls/ddraw/tests/ddraw1.c | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 37775ac..c79c6aa 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6646,6 +6646,8 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw, wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE, d3d_device_update_depth_stencil(device)); + if (version == 1) /* Color keying is initially enabled for version 1 devices. */ + wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_COLORKEYENABLE, TRUE); return D3D_OK; } diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index a217d9a..85625c1 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -131,11 +131,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, buffer->indices[(i * 3) + 1] = ci->u2.v2; buffer->indices[(i * 3) + 2] = ci->u3.v3; instr += size; - } - /* IDirect3DDevices have color keying always enabled - - * enable it before drawing. This overwrites any ALPHA* - * render state. */ - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_COLORKEYENABLE, 1); + } IDirect3DDevice7_DrawIndexedPrimitive(&device->IDirect3DDevice7_iface, D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, buffer->indices, count * 3, 0); } break; diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 6063220..132cc93 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -1244,7 +1244,7 @@ static void test_ck_rgba(void) ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); color = get_surface_color(rt, 320, 240); - if (i == 2 || i == 3) + if (i == 2) todo_wine ok(compare_color(color, tests[i].result1, 1), "Expected color 0x%08x for test %u, got 0x%08x.\n", tests[i].result1, i, color); else @@ -1266,7 +1266,7 @@ static void test_ck_rgba(void) /* This tests that fragments that are masked out by the color key are * discarded, instead of just fully transparent. */ color = get_surface_color(rt, 320, 240); - if (i == 2 || i == 3) + if (i == 2) todo_wine ok(compare_color(color, tests[i].result2, 1), "Expected color 0x%08x for test %u, got 0x%08x.\n", tests[i].result2, i, color); else @@ -1427,7 +1427,7 @@ static void test_ck_default(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); color = get_surface_color(rt, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); @@ -1439,7 +1439,7 @@ static void test_ck_default(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); color = get_surface_color(rt, 320, 240); - todo_wine ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 1), "Got unexpected color 0x%08x.\n", color); hr = IDirect3DViewport_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr);
1
0
0
0
Jacek Caban : wininet: Added better traces for status info in INTERNET_SendCallback.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 23440d918b35ad7d2e596b7a05299701c73ad842 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23440d918b35ad7d2e596b7a0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 24 15:25:12 2012 +0200 wininet: Added better traces for status info in INTERNET_SendCallback. --- dlls/wininet/utility.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/utility.c b/dlls/wininet/utility.c index 9a70e62..68ea2c6 100644 --- a/dlls/wininet/utility.c +++ b/dlls/wininet/utility.c @@ -286,6 +286,18 @@ static const char *get_callback_name(DWORD dwInternetStatus) { return "Unknown"; } +static const char *debugstr_status_info(DWORD status, void *info) +{ + switch(status) { + case INTERNET_STATUS_REQUEST_COMPLETE: { + INTERNET_ASYNC_RESULT *iar = info; + return wine_dbg_sprintf("{%s, %d}", wine_dbgstr_longlong(iar->dwResult), iar->dwError); + } + default: + return wine_dbg_sprintf("%p", info); + } +} + VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwStatusInfoLength) @@ -331,9 +343,9 @@ VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, } } - TRACE(" callback(%p) (%p (%p), %08lx, %d (%s), %p, %d)\n", + TRACE(" callback(%p) (%p (%p), %08lx, %d (%s), %s, %d)\n", hdr->lpfnStatusCB, hdr->hInternet, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus), - lpvNewInfo, dwStatusInfoLength); + debugstr_status_info(dwInternetStatus, lpvNewInfo), dwStatusInfoLength); hdr->lpfnStatusCB(hdr->hInternet, dwContext, dwInternetStatus, lpvNewInfo, dwStatusInfoLength);
1
0
0
0
Jacek Caban : wininet: Added INTERNET_OPTION_REQUEST_FLAGS tests.
by Alexandre Julliard
24 May '12
24 May '12
Module: wine Branch: master Commit: 17d683b0f410d11d2039b5ac7c6488a140d4ea80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17d683b0f410d11d2039b5ac7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 24 15:24:55 2012 +0200 wininet: Added INTERNET_OPTION_REQUEST_FLAGS tests. --- dlls/wininet/tests/http.c | 57 +++++++++++++++++++++++++++++++++++++-------- 1 files changed, 47 insertions(+), 10 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 2909df2..72ee56e 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -220,6 +220,26 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) "[invalid 2] HttpQueryInfo failed: %x(%d)\n", res, GetLastError()); } +#define test_request_flags(a,b) _test_request_flags(__LINE__,a,b,FALSE) +#define test_request_flags_todo(a,b) _test_request_flags(__LINE__,a,b,TRUE) +static void _test_request_flags(unsigned line, HINTERNET req, DWORD exflags, BOOL is_todo) +{ + DWORD flags, size; + BOOL res; + + flags = 0xdeadbeef; + size = sizeof(flags); + res = InternetQueryOptionW(req, INTERNET_OPTION_REQUEST_FLAGS, &flags, &size); + ok_(__FILE__,line)(res, "InternetQueryOptionW(INTERNET_OPTION_REQUEST_FLAGS) failed: %u\n", GetLastError()); + + /* FIXME: Remove once we have INTERNET_REQFLAG_CACHE_WRITE_DISABLED implementation */ + flags &= ~INTERNET_REQFLAG_CACHE_WRITE_DISABLED; + if(!is_todo) + ok_(__FILE__,line)(flags == exflags, "flags = %x, expected %x\n", flags, exflags); + else + todo_wine ok_(__FILE__,line)(flags == exflags, "flags = %x, expected %x\n", flags, exflags); +} + static int close_handle_cnt; static VOID WINAPI callback( @@ -377,7 +397,6 @@ static void InternetReadFile_test(int flags, const test_data_t *test) BOOL res, on_async = TRUE; CHAR buffer[4000]; DWORD length, post_len = 0; - DWORD out; const char *types[2] = { "*", NULL }; HINTERNET hi, hic = 0, hor = 0; @@ -410,7 +429,7 @@ static void InternetReadFile_test(int flags, const test_data_t *test) trace("HttpOpenRequestA <--\n"); hor = HttpOpenRequestA(hic, test->post_data ? "POST" : "GET", test->path, NULL, NULL, types, - INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RESYNCHRONIZE, + INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RELOAD, 0xdeadbead); if (hor == 0x0 && GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED) { /* @@ -426,6 +445,8 @@ static void InternetReadFile_test(int flags, const test_data_t *test) if (hor == 0x0) goto abort; + test_request_flags(hor, INTERNET_REQFLAG_NO_HEADERS); + length = sizeof(buffer); res = InternetQueryOptionA(hor, INTERNET_OPTION_URL, buffer, &length); ok(res, "InternetQueryOptionA(INTERNET_OPTION_URL) failed: %u\n", GetLastError()); @@ -529,9 +550,7 @@ static void InternetReadFile_test(int flags, const test_data_t *test) CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER); CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER); - length = 4; - res = InternetQueryOptionA(hor,INTERNET_OPTION_REQUEST_FLAGS,&out,&length); - ok(res, "InternetQueryOptionA(INTERNET_OPTION_REQUEST) failed with error %d\n", GetLastError()); + test_request_flags(hor, 0); length = 100; res = InternetQueryOptionA(hor,INTERNET_OPTION_URL,buffer,&length); @@ -662,7 +681,7 @@ static void InternetReadFile_chunked_test(void) trace("HttpOpenRequestA <--\n"); hor = HttpOpenRequestA(hic, "GET", "/tests/chunked", NULL, NULL, types, - INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RESYNCHRONIZE, + INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RELOAD, 0xdeadbead); if (hor == 0x0 && GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED) { /* @@ -685,6 +704,8 @@ static void InternetReadFile_chunked_test(void) "Synchronous HttpSendRequest returning 0, error %u\n", GetLastError()); trace("HttpSendRequestA <--\n"); + test_request_flags(hor, 0); + length = 100; res = HttpQueryInfoA(hor,HTTP_QUERY_CONTENT_TYPE,buffer,&length,0x0); buffer[length]=0; @@ -781,7 +802,7 @@ static void InternetReadFileExA_test(int flags) trace("HttpOpenRequestA <--\n"); hor = HttpOpenRequestA(hic, "GET", "/tests/redirect", NULL, NULL, types, - INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RESYNCHRONIZE, + INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RELOAD, 0xdeadbead); if (hor == 0x0 && GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED) { /* @@ -878,6 +899,8 @@ static void InternetReadFileExA_test(int flags) rc ? "TRUE" : "FALSE", GetLastError()); HeapFree(GetProcessHeap(), 0, inetbuffers.lpvBuffer); + test_request_flags(hor, 0); + /* tests to see whether lpcszHeader is used - it isn't */ inetbuffers.dwStructSize = sizeof(INTERNET_BUFFERS); inetbuffers.lpcszHeader = (LPCTSTR)0xdeadbeef; @@ -1039,6 +1062,7 @@ static void HttpSendRequestEx_test(void) } ok( hRequest != NULL, "Failed to open request handle err %u\n", GetLastError()); + test_request_flags(hRequest, INTERNET_REQFLAG_NO_HEADERS); BufferIn.dwStructSize = sizeof( INTERNET_BUFFERS); BufferIn.Next = (LPINTERNET_BUFFERS)0xdeadcab; @@ -1057,12 +1081,18 @@ static void HttpSendRequestEx_test(void) ok(ret, "HttpSendRequestEx Failed with error %u\n", error); ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); + test_request_flags(hRequest, INTERNET_REQFLAG_NO_HEADERS); + for (i = 3; szPostData[i]; i++) ok(InternetWriteFile(hRequest, &szPostData[i], 1, &dwBytesWritten), "InternetWriteFile failed\n"); + test_request_flags(hRequest, INTERNET_REQFLAG_NO_HEADERS); + ok(HttpEndRequest(hRequest, NULL, 0, 0), "HttpEndRequest Failed\n"); + test_request_flags(hRequest, 0); + ok(InternetReadFile(hRequest, szBuffer, 255, &dwBytesRead), "Unable to read response\n"); szBuffer[dwBytesRead] = 0; @@ -1918,6 +1948,7 @@ static void test_proxy_indirect(int port) ok(!strcmp(buffer, "Basic realm=\"placebo\""), "proxy auth info wrong\n"); test_status_code(hr, 407); + test_request_flags(hr, 0); sz = sizeof buffer; r = HttpQueryInfo(hr, HTTP_QUERY_STATUS_TEXT, buffer, &sz, NULL); @@ -2019,6 +2050,7 @@ static void test_header_handling_order(int port) ok(ret, "HttpSendRequest failed\n"); test_status_code(request, 200); + test_request_flags(request, 0); InternetCloseHandle(request); @@ -2378,6 +2410,7 @@ static void test_basic_authentication(int port) ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 200); + test_request_flags(request, 0); InternetCloseHandle(request); InternetCloseHandle(connect); @@ -2404,6 +2437,7 @@ static void test_invalid_response_headers(int port) ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 401); + test_request_flags(request, 0); buffer[0] = 0; size = sizeof(buffer); @@ -2441,10 +2475,14 @@ static void test_response_without_headers(int port) hr = HttpOpenRequest(hc, NULL, "/testG", NULL, NULL, NULL, 0, 0); ok(hr != NULL, "HttpOpenRequest failed %u\n", GetLastError()); + test_request_flags(hr, INTERNET_REQFLAG_NO_HEADERS); + SetLastError(0xdeadbeef); r = HttpSendRequest(hr, NULL, 0, NULL, 0); ok(r, "HttpSendRequest failed %u\n", GetLastError()); + test_request_flags_todo(hr, INTERNET_REQFLAG_NO_HEADERS); + count = 0; memset(buffer, 0, sizeof buffer); SetLastError(0xdeadbeef); @@ -2454,6 +2492,7 @@ static void test_response_without_headers(int port) todo_wine ok(!memcmp(buffer, page1, sizeof page1), "http data wrong\n"); test_status_code(hr, 200); + test_request_flags_todo(hr, INTERNET_REQFLAG_NO_HEADERS); buffer[0] = 0; size = sizeof(buffer); @@ -3535,9 +3574,7 @@ static void test_InternetCloseHandle(void) ok(!res && (GetLastError() == ERROR_IO_PENDING), "Asynchronous HttpSendRequest NOT returning 0 with error ERROR_IO_PENDING\n"); - len = sizeof(flags); - res = InternetQueryOptionA(closetest_req, INTERNET_OPTION_REQUEST_FLAGS, &flags, &len); - ok(res, "InternetQueryOptionA(%p INTERNET_OPTION_URL) failed: %u\n", closetest_req, GetLastError()); + test_request_flags(closetest_req, INTERNET_REQFLAG_NO_HEADERS); res = InternetCloseHandle(closetest_session); ok(res, "InternetCloseHandle failed: %u\n", GetLastError());
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
74
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
Results per page:
10
25
50
100
200