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
July
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
March 2015
----- 2025 -----
July 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
2 participants
775 discussions
Start a n
N
ew thread
Huw Davies : ole32: Add support for parsing the 'CONTENTS' stream.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: 480c10cce994ee1cae89c2fdf9921d0d0e1e4a9d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=480c10cce994ee1cae89c2fdf…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 25 08:37:36 2015 +0000 ole32: Add support for parsing the 'CONTENTS' stream. --- dlls/ole32/datacache.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 53defc1..f791f80 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -92,6 +92,7 @@ enum stream_type { no_stream, pres_stream, + contents_stream }; typedef struct DataCacheEntry @@ -1293,6 +1294,26 @@ static HRESULT parse_pres_streams( DataCache *This, IStorage *stg ) return S_OK; } +static const FORMATETC static_dib_fmt = { CF_DIB, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; + +static HRESULT parse_contents_stream( DataCache *This, IStorage *stg, IStream *stm ) +{ + HRESULT hr; + STATSTG stat; + const FORMATETC *fmt; + + hr = IStorage_Stat( stg, &stat, STATFLAG_NONAME ); + if (FAILED( hr )) return hr; + + if (IsEqualCLSID( &stat.clsid, &CLSID_Picture_Dib )) + fmt = &static_dib_fmt; + else + return E_FAIL; + + return add_cache_entry( This, fmt, stm, contents_stream ); +} + +static const WCHAR CONTENTS[] = {'C','O','N','T','E','N','T','S',0}; /************************************************************************ * DataCache_Load (IPersistStorage) @@ -1306,12 +1327,21 @@ static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg ) { DataCache *This = impl_from_IPersistStorage(iface); HRESULT hr; + IStream *stm; TRACE("(%p, %p)\n", iface, pStg); IPersistStorage_HandsOffStorage( iface ); - hr = parse_pres_streams( This, pStg ); + hr = IStorage_OpenStream( pStg, CONTENTS, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, + 0, &stm ); + if (SUCCEEDED( hr )) + { + hr = parse_contents_stream( This, pStg, stm ); + IStream_Release( stm ); + } + else + hr = parse_pres_streams( This, pStg ); if (SUCCEEDED( hr )) {
1
0
0
0
Huw Davies : ole32: Split the data loading into a couple of helpers.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: d864387aaa5cfc93eba39824fb22e574e7df6773 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d864387aaa5cfc93eba39824f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 25 08:37:35 2015 +0000 ole32: Split the data loading into a couple of helpers. --- dlls/ole32/datacache.c | 157 +++++++++++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 69 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index d13230d..53defc1 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -88,6 +88,12 @@ typedef struct PresentationDataHeader DWORD dwSize; } PresentationDataHeader; +enum stream_type +{ + no_stream, + pres_stream, +}; + typedef struct DataCacheEntry { struct list entry; @@ -103,6 +109,7 @@ typedef struct DataCacheEntry * representation of the object is stored. */ IStream *stream; + enum stream_type stream_type; /* connection ID */ DWORD id; /* dirty flag */ @@ -315,6 +322,7 @@ static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc (*cache_entry)->stgmedium.tymed = TYMED_NULL; (*cache_entry)->stgmedium.pUnkForRelease = NULL; (*cache_entry)->stream = NULL; + (*cache_entry)->stream_type = no_stream; (*cache_entry)->id = This->last_cache_id++; (*cache_entry)->dirty = TRUE; (*cache_entry)->stream_number = -1; @@ -1214,6 +1222,78 @@ static HRESULT WINAPI DataCache_InitNew( return S_OK; } + +static HRESULT add_cache_entry( DataCache *This, const FORMATETC *fmt, IStream *stm, + enum stream_type type ) +{ + DataCacheEntry *cache_entry; + HRESULT hr = S_OK; + + TRACE( "loading entry with formatetc: %s\n", debugstr_formatetc( fmt ) ); + + cache_entry = DataCache_GetEntryForFormatEtc( This, fmt ); + if (!cache_entry) + hr = DataCache_CreateEntry( This, fmt, &cache_entry ); + if (SUCCEEDED( hr )) + { + DataCacheEntry_DiscardData( cache_entry ); + if (cache_entry->stream) IStream_Release( cache_entry->stream ); + cache_entry->stream = stm; + IStream_AddRef( stm ); + cache_entry->stream_type = type; + cache_entry->dirty = FALSE; + } + return hr; +} + +static HRESULT parse_pres_streams( DataCache *This, IStorage *stg ) +{ + HRESULT hr; + IEnumSTATSTG *stat_enum; + STATSTG stat; + IStream *stm; + PresentationDataHeader header; + ULONG actual_read; + CLIPFORMAT clipformat; + FORMATETC fmtetc; + + hr = IStorage_EnumElements( stg, 0, NULL, 0, &stat_enum ); + if (FAILED( hr )) return hr; + + while ((hr = IEnumSTATSTG_Next( stat_enum, 1, &stat, NULL )) == S_OK) + { + if (DataCache_IsPresentationStream( &stat )) + { + hr = IStorage_OpenStream( stg, stat.pwcsName, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, + 0, &stm ); + if (SUCCEEDED( hr )) + { + hr = read_clipformat( stm, &clipformat ); + + if (hr == S_OK) + hr = IStream_Read( stm, &header, sizeof(header), &actual_read ); + + if (hr == S_OK && actual_read == sizeof(header)) + { + fmtetc.cfFormat = clipformat; + fmtetc.ptd = NULL; /* FIXME */ + fmtetc.dwAspect = header.dvAspect; + fmtetc.lindex = header.lindex; + fmtetc.tymed = header.tymed; + + add_cache_entry( This, &fmtetc, stm, pres_stream ); + } + IStream_Release( stm ); + } + } + CoTaskMemFree( stat.pwcsName ); + } + IEnumSTATSTG_Release( stat_enum ); + + return S_OK; +} + + /************************************************************************ * DataCache_Load (IPersistStorage) * @@ -1222,86 +1302,25 @@ static HRESULT WINAPI DataCache_InitNew( * and it will load the presentation information when the * IDataObject_GetData or IViewObject2_Draw methods are called. */ -static HRESULT WINAPI DataCache_Load( - IPersistStorage* iface, - IStorage* pStg) +static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg ) { DataCache *This = impl_from_IPersistStorage(iface); - STATSTG elem; - IEnumSTATSTG *pEnum; HRESULT hr; TRACE("(%p, %p)\n", iface, pStg); - if (This->presentationStorage != NULL) - IStorage_Release(This->presentationStorage); - - This->presentationStorage = pStg; + IPersistStorage_HandsOffStorage( iface ); - hr = IStorage_EnumElements(pStg, 0, NULL, 0, &pEnum); - if (FAILED(hr)) return hr; + hr = parse_pres_streams( This, pStg ); - while ((hr = IEnumSTATSTG_Next(pEnum, 1, &elem, NULL)) == S_OK) + if (SUCCEEDED( hr )) { - if (DataCache_IsPresentationStream(&elem)) - { - IStream *pStm; - - hr = IStorage_OpenStream(This->presentationStorage, elem.pwcsName, - NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, - &pStm); - if (SUCCEEDED(hr)) - { - PresentationDataHeader header; - ULONG actual_read; - CLIPFORMAT clipformat; - - hr = read_clipformat(pStm, &clipformat); - - if (hr == S_OK) - hr = IStream_Read(pStm, &header, sizeof(header), - &actual_read); - - /* can't use SUCCEEDED(hr): S_FALSE counts as an error */ - if (hr == S_OK && actual_read == sizeof(header)) - { - DataCacheEntry *cache_entry; - FORMATETC fmtetc; - - fmtetc.cfFormat = clipformat; - fmtetc.ptd = NULL; /* FIXME */ - fmtetc.dwAspect = header.dvAspect; - fmtetc.lindex = header.lindex; - fmtetc.tymed = header.tymed; - - TRACE("loading entry with formatetc: %s\n", debugstr_formatetc(&fmtetc)); - - cache_entry = DataCache_GetEntryForFormatEtc(This, &fmtetc); - if (!cache_entry) - hr = DataCache_CreateEntry(This, &fmtetc, &cache_entry); - if (SUCCEEDED(hr)) - { - DataCacheEntry_DiscardData(cache_entry); - if (cache_entry->stream) IStream_Release(cache_entry->stream); - cache_entry->stream = pStm; - IStream_AddRef(pStm); - cache_entry->dirty = FALSE; - } - } - - IStream_Release(pStm); - } - } - - CoTaskMemFree(elem.pwcsName); + This->dirty = FALSE; + This->presentationStorage = pStg; + IStorage_AddRef( This->presentationStorage ); } - This->dirty = FALSE; - - IEnumSTATSTG_Release(pEnum); - - IStorage_AddRef(This->presentationStorage); - return S_OK; + return hr; } /************************************************************************
1
0
0
0
Huw Davies : ole32: A cache entry should hold the stream its data is from, not the top-level storage.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: a4e3668f3f4c554d1d7db079c3fffb98bc964afe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4e3668f3f4c554d1d7db079c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 25 08:37:34 2015 +0000 ole32: A cache entry should hold the stream its data is from, not the top-level storage. --- dlls/ole32/datacache.c | 92 +++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 65 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index d9754a3..d13230d 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -98,11 +98,11 @@ typedef struct DataCacheEntry /* cached data */ STGMEDIUM stgmedium; /* - * This storage pointer is set through a call to + * This stream pointer is set through a call to * IPersistStorage_Load. This is where the visual * representation of the object is stored. */ - IStorage *storage; + IStream *stream; /* connection ID */ DWORD id; /* dirty flag */ @@ -218,8 +218,8 @@ static const char * debugstr_formatetc(const FORMATETC *formatetc) static void DataCacheEntry_Destroy(DataCache *cache, DataCacheEntry *cache_entry) { list_remove(&cache_entry->entry); - if (cache_entry->storage) - IStorage_Release(cache_entry->storage); + if (cache_entry->stream) + IStream_Release(cache_entry->stream); HeapFree(GetProcessHeap(), 0, cache_entry->fmtetc.ptd); ReleaseStgMedium(&cache_entry->stgmedium); if(cache_entry->sink_id) @@ -314,7 +314,7 @@ static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc (*cache_entry)->data_cf = 0; (*cache_entry)->stgmedium.tymed = TYMED_NULL; (*cache_entry)->stgmedium.pUnkForRelease = NULL; - (*cache_entry)->storage = NULL; + (*cache_entry)->stream = NULL; (*cache_entry)->id = This->last_cache_id++; (*cache_entry)->dirty = TRUE; (*cache_entry)->stream_number = -1; @@ -477,63 +477,25 @@ static HRESULT write_clipformat(IStream *stream, CLIPFORMAT clipformat) */ static HRESULT DataCacheEntry_OpenPresStream(DataCacheEntry *cache_entry, IStream **ppStm) { - STATSTG elem; - IEnumSTATSTG *pEnum; HRESULT hr; + LARGE_INTEGER offset; - if (!ppStm) return E_POINTER; - - hr = IStorage_EnumElements(cache_entry->storage, 0, NULL, 0, &pEnum); - if (FAILED(hr)) return hr; - - while ((hr = IEnumSTATSTG_Next(pEnum, 1, &elem, NULL)) == S_OK) + if (cache_entry->stream) { - if (DataCache_IsPresentationStream(&elem)) - { - IStream *pStm; - - hr = IStorage_OpenStream(cache_entry->storage, elem.pwcsName, - NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, - &pStm); - if (SUCCEEDED(hr)) - { - PresentationDataHeader header; - ULONG actual_read; - CLIPFORMAT clipformat; - - hr = read_clipformat(pStm, &clipformat); - - if (hr == S_OK) - hr = IStream_Read(pStm, &header, sizeof(header), &actual_read); + /* Rewind the stream before returning it. */ + offset.QuadPart = 0; - /* can't use SUCCEEDED(hr): S_FALSE counts as an error */ - if (hr == S_OK && actual_read == sizeof(header) - && header.dvAspect == cache_entry->fmtetc.dwAspect) - { - /* Rewind the stream before returning it. */ - LARGE_INTEGER offset; - offset.u.LowPart = 0; - offset.u.HighPart = 0; - IStream_Seek(pStm, offset, STREAM_SEEK_SET, NULL); - - *ppStm = pStm; - - CoTaskMemFree(elem.pwcsName); - IEnumSTATSTG_Release(pEnum); - - return S_OK; - } - - IStream_Release(pStm); - } - } - - CoTaskMemFree(elem.pwcsName); + hr = IStream_Seek( cache_entry->stream, offset, STREAM_SEEK_SET, NULL ); + if (SUCCEEDED( hr )) + { + *ppStm = cache_entry->stream; + IStream_AddRef( cache_entry->stream ); + } } + else + hr = OLE_E_BLANK; - IEnumSTATSTG_Release(pEnum); - - return (hr == S_FALSE ? OLE_E_BLANK : hr); + return hr; } /************************************************************************ @@ -841,7 +803,7 @@ static HRESULT DataCacheEntry_SetData(DataCacheEntry *cache_entry, static HRESULT DataCacheEntry_GetData(DataCacheEntry *cache_entry, STGMEDIUM *stgmedium) { - if (stgmedium->tymed == TYMED_NULL && cache_entry->storage) + if (stgmedium->tymed == TYMED_NULL && cache_entry->stream) { HRESULT hr = DataCacheEntry_LoadData(cache_entry); if (FAILED(hr)) @@ -861,10 +823,10 @@ static inline HRESULT DataCacheEntry_DiscardData(DataCacheEntry *cache_entry) static inline void DataCacheEntry_HandsOffStorage(DataCacheEntry *cache_entry) { - if (cache_entry->storage) + if (cache_entry->stream) { - IStorage_Release(cache_entry->storage); - cache_entry->storage = NULL; + IStream_Release(cache_entry->stream); + cache_entry->stream = NULL; } } @@ -1320,9 +1282,9 @@ static HRESULT WINAPI DataCache_Load( if (SUCCEEDED(hr)) { DataCacheEntry_DiscardData(cache_entry); - if (cache_entry->storage) IStorage_Release(cache_entry->storage); - cache_entry->storage = pStg; - IStorage_AddRef(pStg); + if (cache_entry->stream) IStream_Release(cache_entry->stream); + cache_entry->stream = pStm; + IStream_AddRef(pStm); cache_entry->dirty = FALSE; } } @@ -1542,7 +1504,7 @@ static HRESULT WINAPI DataCache_Draw( continue; /* if the data hasn't been loaded yet, do it now */ - if ((cache_entry->stgmedium.tymed == TYMED_NULL) && cache_entry->storage) + if ((cache_entry->stgmedium.tymed == TYMED_NULL) && cache_entry->stream) { hres = DataCacheEntry_LoadData(cache_entry); if (FAILED(hres)) @@ -1784,7 +1746,7 @@ static HRESULT WINAPI DataCache_GetExtent( continue; /* if the data hasn't been loaded yet, do it now */ - if ((cache_entry->stgmedium.tymed == TYMED_NULL) && cache_entry->storage) + if ((cache_entry->stgmedium.tymed == TYMED_NULL) && cache_entry->stream) { hres = DataCacheEntry_LoadData(cache_entry); if (FAILED(hres))
1
0
0
0
Huw Davies : ole32: Read the class id from the top-level storage object.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: c5e020c5b5c0218a146d11cd5fba5aadb6f380cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5e020c5b5c0218a146d11cd5…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 25 08:37:33 2015 +0000 ole32: Read the class id from the top-level storage object. The cache_entries' storages are just references to the same object anyway. --- dlls/ole32/datacache.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 2aae536..d9754a3 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -1182,34 +1182,28 @@ static ULONG WINAPI DataCache_IPersistStorage_Release( /************************************************************************ * DataCache_GetClassID (IPersistStorage) * - * The data cache doesn't implement this method. */ -static HRESULT WINAPI DataCache_GetClassID( - IPersistStorage* iface, - CLSID* pClassID) +static HRESULT WINAPI DataCache_GetClassID(IPersistStorage *iface, CLSID *clsid) { - DataCache *This = impl_from_IPersistStorage(iface); - DataCacheEntry *cache_entry; + DataCache *This = impl_from_IPersistStorage( iface ); + HRESULT hr; + STATSTG statstg; - TRACE("(%p, %p)\n", iface, pClassID); + TRACE( "(%p, %p)\n", iface, clsid ); - LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry) - { - if (cache_entry->storage != NULL) + if (This->presentationStorage) { - STATSTG statstg; - HRESULT hr = IStorage_Stat(cache_entry->storage, &statstg, STATFLAG_NONAME); - if (SUCCEEDED(hr)) - { - *pClassID = statstg.clsid; - return S_OK; - } + hr = IStorage_Stat( This->presentationStorage, &statstg, STATFLAG_NONAME ); + if (SUCCEEDED(hr)) + { + *clsid = statstg.clsid; + return S_OK; + } } - } - *pClassID = CLSID_NULL; + *clsid = CLSID_NULL; - return S_OK; + return S_OK; } /************************************************************************
1
0
0
0
Jinhui Chen : winex11.drv: Fix row-resize/col-resize mapping to X cursor.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: 366ed5495c33e1a8b1c60a8445093f70eae34a38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=366ed5495c33e1a8b1c60a844…
Author: Jinhui Chen <chenjh_06(a)hotmail.com> Date: Wed Mar 25 10:36:08 2015 +0300 winex11.drv: Fix row-resize/col-resize mapping to X cursor. --- dlls/winex11.drv/mouse.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 5f5bdeb..0858f2e 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -815,10 +815,10 @@ static const struct system_cursors comctl32_cursors[] = { 102, "move" }, { 104, "copy" }, { 105, "left_ptr" }, - { 106, "row-resize" }, - { 107, "row-resize" }, + { 106, "col-resize" }, + { 107, "col-resize" }, { 108, "hand2" }, - { 135, "col-resize" }, + { 135, "row-resize" }, { 0 } }; @@ -876,7 +876,7 @@ static const struct cursor_font_fallback fallbacks[] = { "circle", XC_circle }, { "clock", XC_clock }, { "coffee_mug", XC_coffee_mug }, - { "col-resize", XC_sb_v_double_arrow }, + { "col-resize", XC_sb_h_double_arrow }, { "cross", XC_cross }, { "cross_reverse", XC_cross_reverse }, { "crosshair", XC_crosshair }, @@ -913,7 +913,7 @@ static const struct cursor_font_fallback fallbacks[] = { "right_side", XC_right_side }, { "right_tee", XC_right_tee }, { "rightbutton", XC_rightbutton }, - { "row-resize", XC_sb_h_double_arrow }, + { "row-resize", XC_sb_v_double_arrow }, { "rtl_logo", XC_rtl_logo }, { "sailboat", XC_sailboat }, { "sb_down_arrow", XC_sb_down_arrow },
1
0
0
0
Nikolay Sivov : taskmgr: Simplify setting extended style for a list.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: 66722487a7d3755d7facaff53283ee4a5634b00e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66722487a7d3755d7facaff53…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 25 10:06:59 2015 +0300 taskmgr: Simplify setting extended style for a list. --- programs/taskmgr/procpage.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/programs/taskmgr/procpage.c b/programs/taskmgr/procpage.c index 3161399..1b0aacd 100644 --- a/programs/taskmgr/procpage.c +++ b/programs/taskmgr/procpage.c @@ -445,7 +445,6 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) int nXDifference; int nYDifference; int cx, cy; - DWORD extended_styles; switch (message) { case WM_INITDIALOG: @@ -467,11 +466,9 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) hProcessPageEndProcessButton = GetDlgItem(hDlg, IDC_ENDPROCESS); hProcessPageShowAllProcessesButton = GetDlgItem(hDlg, IDC_SHOWALLPROCESSES); - /* - * Set the extended window styles for the list control - */ - extended_styles = SendMessageW(hProcessPageListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); - SendMessageW(hProcessPageListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, extended_styles | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP); + /* Enable manual column reordering, set full select */ + SendMessageW(hProcessPageListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP, + LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP); AddColumns();
1
0
0
0
Nikolay Sivov : comctl32/tests: Listview doesn't subclass its header.
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: 59cb4ff6f3fe167d8fa78811bec7c787881bb1d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59cb4ff6f3fe167d8fa78811b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 25 08:51:51 2015 +0300 comctl32/tests: Listview doesn't subclass its header. --- dlls/comctl32/tests/listview.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 3d439df..8ce1cfe 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -5644,6 +5644,30 @@ static void test_insertitem(void) DestroyWindow(hwnd); } +static void test_header_proc(void) +{ + HWND hwnd, header, hdr; + WNDPROC proc1, proc2; + + hwnd = create_listview_control(LVS_REPORT); + + header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); + ok(header != NULL, "got %p\n", header); + + hdr = CreateWindowExA(0, WC_HEADERA, NULL, + WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ, + 0, 0, 0, 0, + NULL, NULL, NULL, NULL); + ok(hdr != NULL, "got %p\n", hdr); + + proc1 = (WNDPROC)GetWindowLongPtrW(header, GWLP_WNDPROC); + proc2 = (WNDPROC)GetWindowLongPtrW(hdr, GWLP_WNDPROC); + ok(proc1 == proc2, "got %p, expected %p\n", proc1, proc2); + + DestroyWindow(hdr); + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -5712,6 +5736,7 @@ START_TEST(listview) test_imagelists(); test_deleteitem(); test_insertitem(); + test_header_proc(); if (!load_v6_module(&ctx_cookie, &hCtx)) { @@ -5729,6 +5754,7 @@ START_TEST(listview) test_deleteitem(); test_multiselect(); test_insertitem(); + test_header_proc(); unload_v6_module(ctx_cookie, hCtx);
1
0
0
0
Nikolay Sivov : comctl32: Claim success in InitializeFlatSB().
by Alexandre Julliard
25 Mar '15
25 Mar '15
Module: wine Branch: master Commit: 524f6860d40c9564fba62357288fdfa31389882c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=524f6860d40c9564fba623572…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 25 00:07:06 2015 +0300 comctl32: Claim success in InitializeFlatSB(). --- dlls/comctl32/flatsb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c index 174e22d..66e25c3 100644 --- a/dlls/comctl32/flatsb.c +++ b/dlls/comctl32/flatsb.c @@ -63,7 +63,7 @@ typedef struct BOOL WINAPI InitializeFlatSB(HWND hwnd) { TRACE("[%p]\n", hwnd); - return FALSE; + return TRUE; } /***********************************************************************
1
0
0
0
Stefan Dösinger : wined3d: Avoid constant collision in atifs.
by Alexandre Julliard
24 Mar '15
24 Mar '15
Module: wine Branch: master Commit: 3c2d0b983a9ac96bfb2ae01b30bd2e5a3e41bdc4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c2d0b983a9ac96bfb2ae01b3…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Mar 23 18:59:10 2015 +0100 wined3d: Avoid constant collision in atifs. --- dlls/wined3d/ati_fragment_shader.c | 151 ++++++++++++++++++++++++++++--------- 1 file changed, 115 insertions(+), 36 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3c2d0b983a9ac96bfb2ae…
1
0
0
0
Stefan Dösinger : wined3d: Add per-context private data for fragment pipelines.
by Alexandre Julliard
24 Mar '15
24 Mar '15
Module: wine Branch: master Commit: 239e8cad7c01c295f5657cf39f55d255eb0c5044 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=239e8cad7c01c295f5657cf39…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Mar 23 18:59:09 2015 +0100 wined3d: Add per-context private data for fragment pipelines. --- dlls/wined3d/arb_program_shader.c | 11 +++++++++++ dlls/wined3d/ati_fragment_shader.c | 11 +++++++++++ dlls/wined3d/context.c | 7 +++++++ dlls/wined3d/glsl_shader.c | 11 +++++++++++ dlls/wined3d/nvidia_texture_shader.c | 14 ++++++++++++++ dlls/wined3d/state.c | 13 +++++++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 7 files changed, 70 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index aa9dc76..747836c 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -6789,11 +6789,22 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; +static BOOL arbfp_alloc_context_data(struct wined3d_context *context) +{ + return TRUE; +} + +static void arbfp_free_context_data(struct wined3d_context *context) +{ +} + const struct fragment_pipeline arbfp_fragment_pipeline = { arbfp_enable, arbfp_get_caps, arbfp_alloc, arbfp_free, + arbfp_alloc_context_data, + arbfp_free_context_data, shader_arb_color_fixup_supported, arbfp_fragmentstate_template, }; diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index afe7158..ee3e90b 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1249,11 +1249,22 @@ static BOOL atifs_color_fixup_supported(struct color_fixup_desc fixup) return FALSE; } +static BOOL atifs_alloc_context_data(struct wined3d_context *context) +{ + return TRUE; +} + +static void atifs_free_context_data(struct wined3d_context *context) +{ +} + const struct fragment_pipeline atifs_fragment_pipeline = { atifs_enable, atifs_get_caps, atifs_alloc, atifs_free, + atifs_alloc_context_data, + atifs_free_context_data, atifs_color_fixup_supported, atifs_fragmentstate_template, }; diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index f875006..1d7cf9c 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1447,6 +1447,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, ERR("Failed to allocate shader backend context data.\n"); goto out; } + if (!device->adapter->fragment_pipe->allocate_context_data(ret)) + { + ERR("Failed to allocate fragment pipeline context data.\n"); + goto out; + } /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) @@ -1764,6 +1769,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, out: device->shader_backend->shader_free_context_data(ret); + device->adapter->fragment_pipe->free_context_data(ret); HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); @@ -1797,6 +1803,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont } device->shader_backend->shader_free_context_data(context); + device->adapter->fragment_pipe->free_context_data(context); HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 6e3b535..0fa8308 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7539,12 +7539,23 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {0 /* Terminate */, {0, 0 }, WINED3D_GL_EXT_NONE }, }; +static BOOL glsl_fragment_pipe_alloc_context_data(struct wined3d_context *context) +{ + return TRUE; +} + +static void glsl_fragment_pipe_free_context_data(struct wined3d_context *context) +{ +} + const struct fragment_pipeline glsl_fragment_pipe = { glsl_fragment_pipe_enable, glsl_fragment_pipe_get_caps, glsl_fragment_pipe_alloc, glsl_fragment_pipe_free, + glsl_fragment_pipe_alloc_context_data, + glsl_fragment_pipe_free_context_data, shader_glsl_color_fixup_supported, glsl_fragment_pipe_state_template, }; diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index 136e7f7..516b8af 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -906,11 +906,23 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] = {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; +static BOOL nvrc_context_alloc(struct wined3d_context *context) +{ + return TRUE; +} + +static void nvrc_context_free(struct wined3d_context *context) +{ +} + + const struct fragment_pipeline nvts_fragment_pipeline = { nvts_enable, nvrc_fragment_get_caps, nvrc_fragment_alloc, nvrc_fragment_free, + nvrc_context_alloc, + nvrc_context_free, nvts_color_fixup_supported, nvrc_fragmentstate_template, }; @@ -920,6 +932,8 @@ const struct fragment_pipeline nvrc_fragment_pipeline = { nvrc_fragment_get_caps, nvrc_fragment_alloc, nvrc_fragment_free, + nvrc_context_alloc, + nvrc_context_free, nvts_color_fixup_supported, nvrc_fragmentstate_template, }; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4118f69..a949077 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5793,11 +5793,22 @@ static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) return FALSE; } +static BOOL ffp_none_context_alloc(struct wined3d_context *context) +{ + return TRUE; +} + +static void ffp_none_context_free(struct wined3d_context *context) +{ +} + const struct fragment_pipeline ffp_fragment_pipeline = { ffp_enable, ffp_fragment_get_caps, ffp_alloc, ffp_free, + ffp_none_context_alloc, + ffp_none_context_free, ffp_color_fixup_supported, ffp_fragmentstate_template, }; @@ -5841,6 +5852,8 @@ const struct fragment_pipeline none_fragment_pipe = fp_none_get_caps, none_alloc, none_free, + ffp_none_context_alloc, + ffp_none_context_free, fp_none_color_fixup_supported, NULL, }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 99d7aed..c88f9b1 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1190,6 +1190,7 @@ struct wined3d_context GLint aux_buffers; void *shader_backend_data; + void *fragment_pipe_data; /* FBOs */ UINT fbo_entry_count; @@ -1273,6 +1274,8 @@ struct fragment_pipeline void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps); void *(*alloc_private)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv); void (*free_private)(struct wined3d_device *device); + BOOL (*allocate_context_data)(struct wined3d_context *context); + void (*free_context_data)(struct wined3d_context *context); BOOL (*color_fixup_supported)(struct color_fixup_desc fixup); const struct StateEntryTemplate *states; };
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
78
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
Results per page:
10
25
50
100
200