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
June 2017
----- 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
595 discussions
Start a n
N
ew thread
Huw Davies : ole32: InitNew() should fail if there is a current storage.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 33a720b7d7af2eace8a8b3844a5c63dd1042e2cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33a720b7d7af2eace8a8b3844…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:53 2017 +0100 ole32: InitNew() should fail if there is a current storage. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 9809c7a..ecae89d 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -1464,7 +1464,7 @@ static HRESULT WINAPI DataCache_InitNew( TRACE("(%p, %p)\n", iface, pStg); if (This->presentationStorage != NULL) - IStorage_Release(This->presentationStorage); + return CO_E_ALREADYINITIALIZED; This->presentationStorage = pStg;
1
0
0
0
Huw Davies : ole32/tests: Add tests for automatic cache entry creation.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 51cca0b118bb113c21b0b09d0cc186a4025ca28b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51cca0b118bb113c21b0b09d0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:52 2017 +0100 ole32/tests: Add tests for automatic cache entry creation. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/tests/ole2.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index 6c6bea8..2db6de9 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -36,6 +36,7 @@ DEFINE_GUID(CLSID_Picture_Metafile,0x315,0,0,0xc0,0,0,0,0,0,0,0x46); DEFINE_GUID(CLSID_Picture_Dib,0x316,0,0,0xc0,0,0,0,0,0,0,0x46); +DEFINE_GUID(CLSID_Picture_EnhMetafile,0x319,0,0,0xc0,0,0,0,0,0,0,0x46); #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) @@ -1520,7 +1521,7 @@ static const IUnknownVtbl UnknownVtbl = static IUnknown unknown = { &UnknownVtbl }; -static void check_enum_cache(IOleCache2 *cache, STATDATA *expect, int num) +static void check_enum_cache(IOleCache2 *cache, const STATDATA *expect, int num) { IEnumSTATDATA *enum_stat; STATDATA stat; @@ -2253,6 +2254,52 @@ static void test_data_cache_bitmap(void) IOleCache2_Release( cache ); } +/* The CLSID_Picture_ classes automatically create appropriate cache entries */ +static void test_data_cache_init(void) +{ + HRESULT hr; + IOleCache2 *cache; + IPersistStorage *persist; + int i; + CLSID clsid; + static const STATDATA enum_expect[] = + { + {{ CF_DIB, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, 0, NULL, 1 }, + {{ CF_BITMAP, 0, DVASPECT_CONTENT, -1, TYMED_GDI }, 0, NULL, 1 }, + {{ CF_METAFILEPICT, 0, DVASPECT_CONTENT, -1, TYMED_MFPICT }, 0, NULL, 1 }, + {{ CF_ENHMETAFILE, 0, DVASPECT_CONTENT, -1, TYMED_ENHMF }, 0, NULL, 1 } + }; + static const struct + { + const CLSID *clsid; + int enum_start, enum_num; + } data[] = + { + { &CLSID_NULL, 0, 0 }, + { &CLSID_WineTestOld, 0, 0 }, + { &CLSID_Picture_Dib, 0, 2 }, + { &CLSID_Picture_Metafile, 2, 1 }, + { &CLSID_Picture_EnhMetafile, 3, 1 } + }; + + for (i = 0; i < sizeof(data) / sizeof(data[0]); i++) + { + hr = CreateDataCache( NULL, data[i].clsid, &IID_IOleCache2, (void **)&cache ); + ok( hr == S_OK, "got %08x\n", hr ); + + check_enum_cache( cache, enum_expect + data[i].enum_start , data[i].enum_num ); + + IOleCache2_QueryInterface( cache, &IID_IPersistStorage, (void **) &persist ); + hr = IPersistStorage_GetClassID( persist, &clsid ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( IsEqualCLSID( &clsid, data[i].clsid ), "class id mismatch %s %s\n", wine_dbgstr_guid( &clsid ), + wine_dbgstr_guid( data[i].clsid ) ); + + IPersistStorage_Release( persist ); + IOleCache2_Release( cache ); + } +} + static void test_default_handler(void) { HRESULT hr; @@ -3006,6 +3053,7 @@ START_TEST(ole2) test_data_cache_dib_contents_stream( 0 ); test_data_cache_dib_contents_stream( 1 ); test_data_cache_bitmap(); + test_data_cache_init(); test_default_handler(); test_runnable(); test_OleRun();
1
0
0
0
Huw Davies : ole32: Create initial cache entries for the CLSID_Picture_ classes.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 966e8a2c241fa4f5dc06a9c95246883f978cd6e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=966e8a2c241fa4f5dc06a9c95…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:51 2017 +0100 ole32: Create initial cache entries for the CLSID_Picture_ classes. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 113 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 91 insertions(+), 22 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index d97e288..9809c7a 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -160,7 +160,9 @@ struct DataCache */ DWORD sinkAspects; DWORD sinkAdviseFlag; - IAdviseSink* sinkInterface; + IAdviseSink *sinkInterface; + + CLSID clsid; IStorage *presentationStorage; /* list of cache entries */ @@ -360,9 +362,10 @@ static BOOL init_cache_entry(DataCacheEntry *entry, const FORMATETC *fmt, DWORD } static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc, DWORD advf, - DataCacheEntry **cache_entry) + BOOL automatic, DataCacheEntry **cache_entry) { HRESULT hr; + DWORD id = automatic ? 1 : This->last_cache_id; DataCacheEntry *entry; hr = check_valid_clipformat_and_tymed(formatetc->cfFormat, formatetc->tymed); @@ -375,11 +378,16 @@ static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc if (!entry) return E_OUTOFMEMORY; - if (!init_cache_entry(entry, formatetc, advf, This->last_cache_id)) + if (!init_cache_entry(entry, formatetc, advf, id)) goto fail; - list_add_tail(&This->cache_list, &entry->entry); - This->last_cache_id++; + if (automatic) + list_add_head(&This->cache_list, &entry->entry); + else + { + list_add_tail(&This->cache_list, &entry->entry); + This->last_cache_id++; + } if (cache_entry) *cache_entry = entry; return hr; @@ -1042,6 +1050,54 @@ static inline DWORD tymed_from_cf( DWORD cf ) } } +/**************************************************************** + * create_automatic_entry + * + * Creates an appropriate cache entry for one of the CLSID_Picture_ + * classes. The connection id of the entry is one. Any pre-existing + * automatic entry is re-assigned a new connection id, and moved to + * the end of the list. + */ +static HRESULT create_automatic_entry(DataCache *cache, const CLSID *clsid) +{ + static const struct data + { + const CLSID *clsid; + FORMATETC fmt; + } data[] = + { + { &CLSID_Picture_Dib, { CF_DIB, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL } }, + { &CLSID_Picture_Metafile, { CF_METAFILEPICT, 0, DVASPECT_CONTENT, -1, TYMED_MFPICT } }, + { &CLSID_Picture_EnhMetafile, { CF_ENHMETAFILE, 0, DVASPECT_CONTENT, -1, TYMED_ENHMF } }, + { NULL } + }; + const struct data *ptr = data; + struct list *head; + DataCacheEntry *entry; + + if (IsEqualCLSID( &cache->clsid, clsid )) return S_OK; + + /* move and reassign any pre-existing automatic entry */ + if ((head = list_head( &cache->cache_list ))) + { + entry = LIST_ENTRY( head, DataCacheEntry, entry ); + if (entry->id == 1) + { + list_remove( &entry->entry ); + entry->id = cache->last_cache_id++; + list_add_tail( &cache->cache_list, &entry->entry ); + } + } + + while (ptr->clsid) + { + if (IsEqualCLSID( clsid, ptr->clsid )) + return DataCache_CreateEntry( cache, &ptr->fmt, 0, TRUE, NULL ); + ptr++; + } + return S_OK; +} + /********************************************************* * Method implementation for the non delegating IUnknown * part of the DataCache class. @@ -1363,22 +1419,9 @@ static ULONG WINAPI DataCache_IPersistStorage_Release( static HRESULT WINAPI DataCache_GetClassID(IPersistStorage *iface, CLSID *clsid) { DataCache *This = impl_from_IPersistStorage( iface ); - HRESULT hr; - STATSTG statstg; - - TRACE( "(%p, %p)\n", iface, clsid ); - - if (This->presentationStorage) - { - hr = IStorage_Stat( This->presentationStorage, &statstg, STATFLAG_NONAME ); - if (SUCCEEDED(hr)) - { - *clsid = statstg.clsid; - return S_OK; - } - } - *clsid = CLSID_NULL; + TRACE( "(%p, %p) returning %s\n", iface, clsid, debugstr_guid(&This->clsid) ); + *clsid = This->clsid; return S_OK; } @@ -1415,6 +1458,8 @@ static HRESULT WINAPI DataCache_InitNew( IStorage* pStg) { DataCache *This = impl_from_IPersistStorage(iface); + CLSID clsid; + HRESULT hr; TRACE("(%p, %p)\n", iface, pStg); @@ -1425,6 +1470,15 @@ static HRESULT WINAPI DataCache_InitNew( IStorage_AddRef(This->presentationStorage); This->dirty = TRUE; + ReadClassStg( pStg, &clsid ); + hr = create_automatic_entry( This, &clsid ); + if (FAILED(hr)) + { + IStorage_Release( pStg ); + This->presentationStorage = NULL; + return hr; + } + This->clsid = clsid; return S_OK; } @@ -1440,7 +1494,7 @@ static HRESULT add_cache_entry( DataCache *This, const FORMATETC *fmt, DWORD adv cache_entry = DataCache_GetEntryForFormatEtc( This, fmt ); if (!cache_entry) - hr = DataCache_CreateEntry( This, fmt, advf, &cache_entry ); + hr = DataCache_CreateEntry( This, fmt, advf, FALSE, &cache_entry ); if (SUCCEEDED( hr )) { DataCacheEntry_DiscardData( cache_entry ); @@ -1537,11 +1591,22 @@ static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg ) DataCache *This = impl_from_IPersistStorage(iface); HRESULT hr; IStream *stm; + CLSID clsid; + DataCacheEntry *entry, *cursor2; TRACE("(%p, %p)\n", iface, pStg); IPersistStorage_HandsOffStorage( iface ); + LIST_FOR_EACH_ENTRY_SAFE( entry, cursor2, &This->cache_list, DataCacheEntry, entry ) + DataCacheEntry_Destroy( This, entry ); + + ReadClassStg( pStg, &clsid ); + hr = create_automatic_entry( This, &clsid ); + if (FAILED( hr )) return hr; + + This->clsid = clsid; + hr = IStorage_OpenStream( pStg, CONTENTS, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm ); if (SUCCEEDED( hr )) @@ -2191,7 +2256,7 @@ static HRESULT WINAPI DataCache_Cache( return CACHE_S_SAMECACHE; } - hr = DataCache_CreateEntry(This, &fmt_cpy, advf, &cache_entry); + hr = DataCache_CreateEntry(This, &fmt_cpy, advf, FALSE, &cache_entry); if (SUCCEEDED(hr)) { @@ -2622,12 +2687,16 @@ static DataCache* DataCache_Construct( newObject->sinkAspects = 0; newObject->sinkAdviseFlag = 0; newObject->sinkInterface = 0; + newObject->clsid = CLSID_NULL; newObject->presentationStorage = NULL; list_init(&newObject->cache_list); newObject->last_cache_id = 2; newObject->dirty = FALSE; newObject->running_object = NULL; + create_automatic_entry( newObject, clsid ); + newObject->clsid = *clsid; + return newObject; }
1
0
0
0
Huw Davies : ole32: Add the ability to create an entry without returning it.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 111b72fc85b19820a71accc037e6904638c4380a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=111b72fc85b19820a71accc03…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:50 2017 +0100 ole32: Add the ability to create an entry without returning it. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index c9ab200..d97e288 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -363,6 +363,7 @@ static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc DataCacheEntry **cache_entry) { HRESULT hr; + DataCacheEntry *entry; hr = check_valid_clipformat_and_tymed(formatetc->cfFormat, formatetc->tymed); if (FAILED(hr)) @@ -370,20 +371,21 @@ static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc if (hr == CACHE_S_FORMATETC_NOTSUPPORTED) TRACE("creating unsupported format %d\n", formatetc->cfFormat); - *cache_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(**cache_entry)); - if (!*cache_entry) + entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry)); + if (!entry) return E_OUTOFMEMORY; - if (!init_cache_entry(*cache_entry, formatetc, advf, This->last_cache_id)) + if (!init_cache_entry(entry, formatetc, advf, This->last_cache_id)) goto fail; - list_add_tail(&This->cache_list, &(*cache_entry)->entry); + list_add_tail(&This->cache_list, &entry->entry); This->last_cache_id++; + if (cache_entry) *cache_entry = entry; return hr; fail: - HeapFree(GetProcessHeap(), 0, *cache_entry); + HeapFree(GetProcessHeap(), 0, entry); return E_OUTOFMEMORY; }
1
0
0
0
Huw Davies : ole32: Start allocating regular cache entries with id of 2.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 705ccd748812566bd5bc33ff75705bde5ef62236 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=705ccd748812566bd5bc33ff7…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:49 2017 +0100 ole32: Start allocating regular cache entries with id of 2. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 2 +- dlls/ole32/tests/ole2.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index d921603..c9ab200 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -2622,7 +2622,7 @@ static DataCache* DataCache_Construct( newObject->sinkInterface = 0; newObject->presentationStorage = NULL; list_init(&newObject->cache_list); - newObject->last_cache_id = 1; + newObject->last_cache_id = 2; newObject->dirty = FALSE; newObject->running_object = NULL; diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index 37e89da..6c6bea8 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -2140,6 +2140,7 @@ static void test_data_cache_bitmap(void) hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); ok( hr == S_OK, "got %08x\n", hr ); + ok( conn == 2, "got %d\n", conn ); expect[0].dwConnection = conn; expect[1].dwConnection = conn; @@ -2158,6 +2159,7 @@ static void test_data_cache_bitmap(void) hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); ok( hr == S_OK, "got %08x\n", hr ); + ok( conn == 3, "got %d\n", conn ); expect[2].dwConnection = conn; check_enum_cache( cache, expect, 3); @@ -2168,6 +2170,7 @@ static void test_data_cache_bitmap(void) hr = IOleCache2_Cache( cache, &fmt, 0, &conn ); ok( hr == S_OK, "got %08x\n", hr ); + ok( conn == 4, "got %d\n", conn ); expect[3].dwConnection = conn; check_enum_cache( cache, expect, 4 );
1
0
0
0
Huw Davies : ole32: Fix incorrectly assigned member in the presentation stream.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 026756482aee72fc3c0fd5eecd257fdd8ebf5d2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=026756482aee72fc3c0fd5eec…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Jun 6 11:46:48 2017 +0100 ole32: Fix incorrectly assigned member in the presentation stream. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 36 ++++++++++++++++++++++++------------ dlls/ole32/tests/ole2.c | 16 +++++++--------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index b6c227e..d921603 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -82,7 +82,7 @@ typedef struct PresentationDataHeader DWORD unknown3; /* 4, possibly TYMED_ISTREAM */ DVASPECT dvAspect; DWORD lindex; - DWORD tymed; + DWORD advf; DWORD unknown7; /* 0 */ DWORD dwObjectExtentX; DWORD dwObjectExtentY; @@ -320,10 +320,10 @@ static DataCacheEntry *DataCache_GetEntryForFormatEtc(DataCache *This, const FOR /* checks that the clipformat and tymed are valid and returns an error if they * aren't and CACHE_S_NOTSUPPORTED if they are valid, but can't be rendered by * DataCache_Draw */ -static HRESULT check_valid_clipformat_and_tymed(CLIPFORMAT cfFormat, DWORD tymed, BOOL load) +static HRESULT check_valid_clipformat_and_tymed(CLIPFORMAT cfFormat, DWORD tymed) { if (!cfFormat || !tymed || - (cfFormat == CF_METAFILEPICT && (tymed == TYMED_MFPICT || load)) || + (cfFormat == CF_METAFILEPICT && tymed == TYMED_MFPICT) || (cfFormat == CF_BITMAP && tymed == TYMED_GDI) || (cfFormat == CF_DIB && tymed == TYMED_HGLOBAL) || (cfFormat == CF_ENHMETAFILE && tymed == TYMED_ENHMF)) @@ -360,11 +360,11 @@ static BOOL init_cache_entry(DataCacheEntry *entry, const FORMATETC *fmt, DWORD } static HRESULT DataCache_CreateEntry(DataCache *This, const FORMATETC *formatetc, DWORD advf, - DataCacheEntry **cache_entry, BOOL load) + DataCacheEntry **cache_entry) { HRESULT hr; - hr = check_valid_clipformat_and_tymed(formatetc->cfFormat, formatetc->tymed, load); + hr = check_valid_clipformat_and_tymed(formatetc->cfFormat, formatetc->tymed); if (FAILED(hr)) return hr; if (hr == CACHE_S_FORMATETC_NOTSUPPORTED) @@ -798,7 +798,7 @@ static HRESULT DataCacheEntry_Save(DataCacheEntry *cache_entry, IStorage *storag header.unknown3 = 4; header.dvAspect = cache_entry->fmtetc.dwAspect; header.lindex = cache_entry->fmtetc.lindex; - header.tymed = cache_entry->stgmedium.tymed; + header.advf = cache_entry->advise_flags; header.unknown7 = 0; header.dwObjectExtentX = 0; header.dwObjectExtentY = 0; @@ -1028,6 +1028,18 @@ static inline void DataCacheEntry_HandsOffStorage(DataCacheEntry *cache_entry) } } +static inline DWORD tymed_from_cf( DWORD cf ) +{ + switch( cf ) + { + case CF_BITMAP: return TYMED_GDI; + case CF_METAFILEPICT: return TYMED_MFPICT; + case CF_ENHMETAFILE: return TYMED_ENHMF; + case CF_DIB: + default: return TYMED_HGLOBAL; + } +} + /********************************************************* * Method implementation for the non delegating IUnknown * part of the DataCache class. @@ -1416,7 +1428,7 @@ static HRESULT WINAPI DataCache_InitNew( } -static HRESULT add_cache_entry( DataCache *This, const FORMATETC *fmt, IStream *stm, +static HRESULT add_cache_entry( DataCache *This, const FORMATETC *fmt, DWORD advf, IStream *stm, enum stream_type type ) { DataCacheEntry *cache_entry; @@ -1426,7 +1438,7 @@ static HRESULT add_cache_entry( DataCache *This, const FORMATETC *fmt, IStream * cache_entry = DataCache_GetEntryForFormatEtc( This, fmt ); if (!cache_entry) - hr = DataCache_CreateEntry( This, fmt, 0, &cache_entry, TRUE ); + hr = DataCache_CreateEntry( This, fmt, advf, &cache_entry ); if (SUCCEEDED( hr )) { DataCacheEntry_DiscardData( cache_entry ); @@ -1472,9 +1484,9 @@ static HRESULT parse_pres_streams( DataCache *This, IStorage *stg ) fmtetc.ptd = NULL; /* FIXME */ fmtetc.dwAspect = header.dvAspect; fmtetc.lindex = header.lindex; - fmtetc.tymed = header.tymed; + fmtetc.tymed = tymed_from_cf( clipformat ); - add_cache_entry( This, &fmtetc, stm, pres_stream ); + add_cache_entry( This, &fmtetc, header.advf, stm, pres_stream ); } IStream_Release( stm ); } @@ -1505,7 +1517,7 @@ static HRESULT parse_contents_stream( DataCache *This, IStorage *stg, IStream *s return E_FAIL; } - return add_cache_entry( This, fmt, stm, contents_stream ); + return add_cache_entry( This, fmt, 0, stm, contents_stream ); } static const WCHAR CONTENTS[] = {'C','O','N','T','E','N','T','S',0}; @@ -2177,7 +2189,7 @@ static HRESULT WINAPI DataCache_Cache( return CACHE_S_SAMECACHE; } - hr = DataCache_CreateEntry(This, &fmt_cpy, advf, &cache_entry, FALSE); + hr = DataCache_CreateEntry(This, &fmt_cpy, advf, &cache_entry); if (SUCCEEDED(hr)) { diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index 394371b..37e89da 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -135,7 +135,7 @@ typedef struct PresentationDataHeader DWORD unknown3; /* 4, possibly TYMED_ISTREAM */ DVASPECT dvAspect; DWORD lindex; - DWORD tymed; + DWORD advf; DWORD unknown7; /* 0 */ DWORD dwObjectExtentX; DWORD dwObjectExtentY; @@ -1173,7 +1173,7 @@ static void test_OleLoad(IStorage *pStorage) IStorage *stg; IStream *stream; IUnknown *obj; - DWORD data, i, tymed, data_size; + DWORD data, i, data_size; PresentationDataHeader header; HDC hdc; HGDIOBJ hobj; @@ -1222,12 +1222,10 @@ static void test_OleLoad(IStorage *pStorage) break; } - tymed = 1 << i; - header.unknown3 = 4; header.dvAspect = DVASPECT_CONTENT; header.lindex = -1; - header.tymed = tymed; + header.advf = 1 << i; header.unknown7 = 0; header.dwObjectExtentX = 1; header.dwObjectExtentY = 1; @@ -1247,19 +1245,19 @@ static void test_OleLoad(IStorage *pStorage) IStorage_Release(stg); continue; } - ok(hr == S_OK, "OleLoad error %#x: cfFormat = %u, tymed = %u\n", hr, fmt, tymed); + ok(hr == S_OK, "OleLoad error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); hdc = CreateCompatibleDC(0); SetRect(&rc, 0, 0, 100, 100); hr = OleDraw(obj, DVASPECT_CONTENT, hdc, &rc); DeleteDC(hdc); if (fmt == CF_METAFILEPICT) - ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, tymed = %u\n", hr, fmt, tymed); + ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); else if (fmt == CF_ENHMETAFILE) todo_wine - ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, tymed = %u\n", hr, fmt, tymed); + ok(hr == S_OK, "OleDraw error %#x: cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); else - ok(hr == OLE_E_BLANK || hr == OLE_E_NOTRUNNING || hr == E_FAIL, "OleDraw should fail: %#x, cfFormat = %u, tymed = %u\n", hr, fmt, header.tymed); + ok(hr == OLE_E_BLANK || hr == OLE_E_NOTRUNNING || hr == E_FAIL, "OleDraw should fail: %#x, cfFormat = %u, advf = %#x\n", hr, fmt, header.advf); IUnknown_Release(obj); IStorage_Release(stg);
1
0
0
0
Piotr Caban : msvcrt: Translate SEH exception on each call to __CxxFrameHandler (i386).
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: c7a51dfdcb58f96125f832eda67665e7eef657b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7a51dfdcb58f96125f832eda…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 6 12:10:41 2017 +0200 msvcrt: Translate SEH exception on each call to __CxxFrameHandler (i386). Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/except_i386.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 963bd58..f777ba6 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -96,6 +96,13 @@ typedef struct __cxx_function_descr UINT flags; /* flags when magic >= VC8 */ } cxx_function_descr; +typedef struct +{ + cxx_exception_frame *frame; + const cxx_function_descr *descr; + EXCEPTION_REGISTRATION_RECORD *nested_frame; +} se_translator_ctx; + typedef struct _SCOPETABLE { int previousTryLevel; @@ -532,6 +539,26 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs, return EXCEPTION_EXECUTE_HANDLER; } +static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c ) +{ + se_translator_ctx *ctx = (se_translator_ctx *)c; + EXCEPTION_RECORD *rec = ep->ExceptionRecord; + cxx_exception_type *exc_type; + + if (rec->ExceptionCode != CXX_EXCEPTION) + { + TRACE( "non-c++ exception thrown in SEH handler: %x\n", rec->ExceptionCode ); + MSVCRT_terminate(); + } + + exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; + call_catch_block( rec, ctx->frame, ctx->descr, + ctx->frame->trylevel, ctx->nested_frame, exc_type ); + + __DestructExceptionObject( rec ); + return ExceptionContinueSearch; +} + /********************************************************************* * cxx_frame_handler * @@ -604,10 +631,21 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame if (data->se_translator) { EXCEPTION_POINTERS except_ptrs; + se_translator_ctx ctx; - except_ptrs.ExceptionRecord = rec; - except_ptrs.ContextRecord = context; - data->se_translator(rec->ExceptionCode, &except_ptrs); + ctx.frame = frame; + ctx.descr = descr; + ctx.nested_frame = nested_frame; + __TRY + { + except_ptrs.ExceptionRecord = rec; + except_ptrs.ContextRecord = context; + data->se_translator( rec->ExceptionCode, &except_ptrs ); + } + __EXCEPT_CTX(se_translation_filter, &ctx) + { + } + __ENDTRY } }
1
0
0
0
Francois Gouget : jscript: A spelling fix in a comment.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 5c8c4d92f6e09ea2ba0c17da5a3d3fea75a13513 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c8c4d92f6e09ea2ba0c17da5…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jun 4 11:39:35 2017 +0200 jscript: A spelling fix in a comment. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 61c4077..cbc360f 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1743,7 +1743,7 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) if(stat->finally_statement) { /* * finally block expects two elements on the stack, which may be: - * - (true, return_addr) set by OP_pop_except, OP_end_finally jumps back to passed addres + * - (true, return_addr) set by OP_pop_except, OP_end_finally jumps back to passed address * - (false, exception_value) set when unwinding an exception, which OP_end_finally rethrows */ finally_off = ctx->code_off;
1
0
0
0
Francois Gouget : wbemdisp: Add a trailing newline to a TRACE() message.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 82527f8a00531b89a1c68c6e1624544d2dfbb123 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82527f8a00531b89a1c68c6e1…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jun 4 11:40:44 2017 +0200 wbemdisp: Add a trailing newline to a TRACE() message. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemdisp/locator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 6fdd608..d1be48f 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -421,7 +421,7 @@ static HRESULT WINAPI propertyset_Item( ISWbemPropertySet *iface, BSTR name, HRESULT hr; VARIANT var; - TRACE( "%p, %s, %08x, %p", propertyset, debugstr_w(name), flags, prop ); + TRACE( "%p, %s, %08x, %p\n", propertyset, debugstr_w(name), flags, prop ); hr = IWbemClassObject_Get( propertyset->object, name, 0, &var, NULL, NULL ); if (SUCCEEDED(hr))
1
0
0
0
Francois Gouget : ole32: Make bitmap_info_size() static.
by Alexandre Julliard
06 Jun '17
06 Jun '17
Module: wine Branch: master Commit: 85a130958cf3d5138ee9711dbede1ff44098bf60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85a130958cf3d5138ee9711db…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sun Jun 4 11:38:56 2017 +0200 ole32: Make bitmap_info_size() static. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/datacache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 420711a..b6c227e 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -229,7 +229,7 @@ const char *debugstr_formatetc(const FORMATETC *formatetc) * * Return the size of the bitmap info structure including color table. */ -int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) +static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) { unsigned int colors, size, masks = 0;
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
60
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
Results per page:
10
25
50
100
200