winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 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
712 discussions
Start a n
N
ew thread
Nikolay Sivov : msxml3: Protect from null pointer in load().
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 13d95525c3f6886f29df658b2d03a415abcbf5e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13d95525c3f6886f29df658b2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 14 22:52:35 2012 +0400 msxml3: Protect from null pointer in load(). --- dlls/msxml3/domdoc.c | 1 + dlls/msxml3/tests/domdoc.c | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index cbbebf2..0f3eb50 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2093,6 +2093,7 @@ static HRESULT WINAPI domdoc_load( } break; case VT_UNKNOWN: + if (!V_UNKNOWN(&source)) return E_INVALIDARG; hr = IUnknown_QueryInterface(V_UNKNOWN(&source), &IID_IXMLDOMDocument3, (void**)&pNewDoc); if(hr == S_OK) { diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 46b628f..dfa6126 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -10749,6 +10749,13 @@ static void test_load(void) doc = create_document(&IID_IXMLDOMDocument); + /* null pointer as input */ + V_VT(&src) = VT_UNKNOWN; + V_UNKNOWN(&src) = NULL; + hr = IXMLDOMDocument_load(doc, src, &b); + EXPECT_HR(hr, E_INVALIDARG); + ok(b == VARIANT_FALSE, "got %d\n", b); + path = _bstr_("test.xml"); /* load from path: VT_BSTR */
1
0
0
0
Nikolay Sivov : ole32: Implement SetConvertStg().
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 39562961283ccb7c838c5650b11873e69a8d8e56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39562961283ccb7c838c5650b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 14 22:39:15 2012 +0400 ole32: Implement SetConvertStg(). --- dlls/ole32/ole2stubs.c | 9 ----- dlls/ole32/storage32.c | 78 +++++++++++++++++++++++++++++++++++++++--- dlls/ole32/tests/storage32.c | 5 ++- 3 files changed, 76 insertions(+), 16 deletions(-) diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c index 6988dfe..5a90e2d 100644 --- a/dlls/ole32/ole2stubs.c +++ b/dlls/ole32/ole2stubs.c @@ -44,15 +44,6 @@ HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, } /****************************************************************************** - * SetConvertStg [OLE32.@] - */ -HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert) -{ - FIXME("(%p,%x), stub!\n", pStg, fConvert); - return E_NOTIMPL; -} - -/****************************************************************************** * OleCreateLink [OLE32.@] */ HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index c04675d..a1c925f 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9383,7 +9383,7 @@ HRESULT WINAPI OleConvertIStorageToOLESTREAM ( enum stream_1ole_flags { OleStream_LinkedObject = 0x00000001, - OleStream_Convert = 0x00000100 + OleStream_Convert = 0x00000004 }; /*********************************************************************** @@ -9396,7 +9396,6 @@ HRESULT WINAPI GetConvertStg(IStorage *stg) DWORD header[2]; IStream *stream; HRESULT hr; - ULONG len; TRACE("%p\n", stg); @@ -9405,20 +9404,89 @@ HRESULT WINAPI GetConvertStg(IStorage *stg) hr = IStorage_OpenStream(stg, stream_1oleW, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream); if (FAILED(hr)) return hr; - len = 0; - hr = IStream_Read(stream, header, sizeof(header), &len); + hr = IStream_Read(stream, header, sizeof(header), NULL); IStream_Release(stream); if (FAILED(hr)) return hr; if (header[0] != version_magic) { - ERR("got wrong version magic for \1Ole stream, 0x%08x\n", header[0]); + ERR("got wrong version magic for 1Ole stream, 0x%08x\n", header[0]); return E_FAIL; } return header[1] & OleStream_Convert ? S_OK : S_FALSE; } +/*********************************************************************** + * SetConvertStg (OLE32.@) + */ +HRESULT WINAPI SetConvertStg(IStorage *storage, BOOL convert) +{ + static const WCHAR stream_1oleW[] = {1,'O','l','e',0}; + static const DWORD version_magic = 0x02000001; + DWORD flags = convert ? OleStream_Convert : 0; + IStream *stream; + HRESULT hr; + + TRACE("(%p, %d)\n", storage, convert); + + hr = IStorage_CreateStream(storage, stream_1oleW, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stream); + if (hr == S_OK) + { + struct empty_1ole_stream { + DWORD version_magic; + DWORD flags; + BYTE padding[12]; + }; + struct empty_1ole_stream stream_data; + + stream_data.version_magic = version_magic; + stream_data.flags = flags; + memset(stream_data.padding, 0, sizeof(stream_data.padding)); + + hr = IStream_Write(stream, &stream_data, sizeof(stream_data), NULL); + IStream_Release(stream); + } + else if (hr == STG_E_FILEALREADYEXISTS) + { + DWORD header[2]; + + hr = IStorage_OpenStream(storage, stream_1oleW, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stream); + if (FAILED(hr)) return hr; + + hr = IStream_Read(stream, header, sizeof(header), NULL); + if (FAILED(hr)) + { + IStream_Release(stream); + return hr; + } + + /* update flag if differs */ + if ((header[1] ^ flags) & OleStream_Convert) + { + LARGE_INTEGER pos; + + if (header[1] & OleStream_Convert) + flags = header[1] & ~OleStream_Convert; + else + flags = header[1] | OleStream_Convert; + + pos.QuadPart = sizeof(DWORD); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + if (FAILED(hr)) + { + IStream_Release(stream); + return hr; + } + + hr = IStream_Write(stream, &flags, sizeof(flags), NULL); + } + IStream_Release(stream); + } + + return hr; +} + /****************************************************************************** * StgIsStorageFile [OLE32.@] * Verify if the file contains a storage object diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 86b8d8e..c79b5d1 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -3009,7 +3009,8 @@ static void test_convert(void) hr = GetConvertStg(stg); ok(hr == STG_E_FILENOTFOUND, "got 0x%08x\n", hr); hr = SetConvertStg(stg, TRUE); -todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = SetConvertStg(stg, TRUE); ok(hr == S_OK, "got 0x%08x\n", hr); hr = GetConvertStg(stg); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -3017,7 +3018,7 @@ todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); hr = GetConvertStg(stg); ok(hr == S_FALSE, "got 0x%08x\n", hr); -} + IStorage_Release(stg); DeleteFileW(filename);
1
0
0
0
Nikolay Sivov : ole32: No need to test for null implementation pointer in methods.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: a3a97558de148116f5bfea66c142e8ff4b9f5990 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3a97558de148116f5bfea66c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 14 21:13:40 2012 +0400 ole32: No need to test for null implementation pointer in methods. --- dlls/ole32/storage32.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index df84108..c04675d 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -365,7 +365,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface( { StorageBaseImpl *This = impl_from_IStorage(iface); - if ( (This==0) || (ppvObject==0) ) + if (!ppvObject) return E_INVALIDARG; *ppvObject = 0; @@ -379,8 +379,7 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface( { *ppvObject = &This->IPropertySetStorage_iface; } - - if ((*ppvObject)==0) + else return E_NOINTERFACE; IStorage_AddRef(iface); @@ -578,7 +577,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage( iface, debugstr_w(pwcsName), pstgPriority, grfMode, snbExclude, reserved, ppstg); - if ( (This==0) || (pwcsName==NULL) || (ppstg==0) ) + if ((pwcsName==NULL) || (ppstg==0) ) { res = E_INVALIDARG; goto end; @@ -709,7 +708,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements( TRACE("(%p, %d, %p, %d, %p)\n", iface, reserved1, reserved2, reserved3, ppenum); - if ( (This==0) || (ppenum==0)) + if (!ppenum) return E_INVALIDARG; if (This->reverted) @@ -719,7 +718,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements( This, This->storageDirEntry); - if (newEnum!=0) + if (newEnum) { *ppenum = &newEnum->IEnumSTATSTG_iface; @@ -750,7 +749,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat( TRACE("(%p, %p, %x)\n", iface, pstatstg, grfStatFlag); - if ( (This==0) || (pstatstg==0)) + if (!pstatstg) { res = E_INVALIDARG; goto end; @@ -2076,7 +2075,7 @@ static HRESULT deleteStorageContents( /* * Open the storage and enumerate it */ - hr = StorageBaseImpl_OpenStorage( + hr = IStorage_OpenStorage( &parentStorage->IStorage_iface, entryDataToDelete.name, 0, @@ -2209,11 +2208,11 @@ static HRESULT removeFromTree( DirRef parentStorageIndex, DirRef deletedIndex) { - HRESULT hr = S_OK; DirEntry entryToDelete; DirEntry parentEntry; DirRef parentEntryRef; ULONG typeOfRelation; + HRESULT hr; hr = StorageBaseImpl_ReadDirEntry(This, deletedIndex, &entryToDelete);
1
0
0
0
Nikolay Sivov : ole32: COM cleanup of IPropertySetStorage interface.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: ac032593c050ca0b6fb7234cbba458b39db25dff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac032593c050ca0b6fb7234cb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jul 14 20:42:48 2012 +0400 ole32: COM cleanup of IPropertySetStorage interface. --- dlls/ole32/stg_prop.c | 16 +++++++--------- dlls/ole32/stg_stream.c | 4 ++-- dlls/ole32/storage32.c | 13 ++++++------- dlls/ole32/storage32.h | 2 +- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 5e22a40..9e3df45 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -60,7 +60,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage); static inline StorageImpl *impl_from_IPropertySetStorage( IPropertySetStorage *iface ) { - return (StorageImpl *)((char*)iface - FIELD_OFFSET(StorageImpl, base.pssVtbl)); + return CONTAINING_RECORD(iface, StorageImpl, base.IPropertySetStorage_iface); } /* These are documented in MSDN, @@ -2100,7 +2100,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface( void** ppvObject) { StorageImpl *This = impl_from_IPropertySetStorage(ppstg); - return IStorage_QueryInterface( (IStorage*)This, riid, ppvObject ); + return IStorage_QueryInterface( &This->base.IStorage_iface, riid, ppvObject ); } /************************************************************************ @@ -2112,7 +2112,7 @@ static ULONG WINAPI IPropertySetStorage_fnAddRef( IPropertySetStorage *ppstg) { StorageImpl *This = impl_from_IPropertySetStorage(ppstg); - return IStorage_AddRef( (IStorage*)This ); + return IStorage_AddRef( &This->base.IStorage_iface ); } /************************************************************************ @@ -2124,7 +2124,7 @@ static ULONG WINAPI IPropertySetStorage_fnRelease( IPropertySetStorage *ppstg) { StorageImpl *This = impl_from_IPropertySetStorage(ppstg); - return IStorage_Release( (IStorage*)This ); + return IStorage_Release( &This->base.IStorage_iface ); } /************************************************************************ @@ -2173,7 +2173,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate( if (FAILED(r)) goto end; - r = IStorage_CreateStream( (IStorage*)This, name, grfMode, 0, 0, &stm ); + r = IStorage_CreateStream( &This->base.IStorage_iface, name, grfMode, 0, 0, &stm ); if (FAILED(r)) goto end; @@ -2218,7 +2218,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen( if (FAILED(r)) goto end; - r = IStorage_OpenStream((IStorage*) This, name, 0, grfMode, 0, &stm ); + r = IStorage_OpenStream( &This->base.IStorage_iface, name, 0, grfMode, 0, &stm ); if (FAILED(r)) goto end; @@ -2237,7 +2237,6 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete( REFFMTID rfmtid) { StorageImpl *This = impl_from_IPropertySetStorage(ppstg); - IStorage *stg = NULL; WCHAR name[CCH_MAX_PROPSTG_NAME]; HRESULT r; @@ -2250,8 +2249,7 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete( if (FAILED(r)) return r; - stg = (IStorage*) This; - return IStorage_DestroyElement(stg, name); + return IStorage_DestroyElement(&This->base.IStorage_iface, name); } /************************************************************************ diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 019a789..6a39b94 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -57,7 +57,7 @@ static void StgStreamImpl_Destroy(StgStreamImpl* This) /* * Release the reference we are holding on the parent storage. - * IStorage_Release((IStorage*)This->parentStorage); + * IStorage_Release(&This->parentStorage->IStorage_iface); * * No, don't do this. Some apps call IStorage_Release without * calling IStream_Release first. If we grab a reference the @@ -719,7 +719,7 @@ StgStreamImpl* StgStreamImpl_Construct( * We want to nail-down the reference to the storage in case the * stream out-lives the storage in the client application. * - * -- IStorage_AddRef((IStorage*)newStream->parentStorage); + * -- IStorage_AddRef(&newStream->parentStorage->IStorage_iface); * * No, don't do this. Some apps call IStorage_Release without * calling IStream_Release first. If we grab a reference the diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 4e802f5..df84108 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -373,11 +373,11 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface( if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IStorage, riid)) { - *ppvObject = This; + *ppvObject = &This->IStorage_iface; } else if (IsEqualGUID(&IID_IPropertySetStorage, riid)) { - *ppvObject = &This->pssVtbl; + *ppvObject = &This->IPropertySetStorage_iface; } if ((*ppvObject)==0) @@ -2718,7 +2718,7 @@ static HRESULT StorageImpl_Construct( list_init(&This->base.storageHead); This->base.IStorage_iface.lpVtbl = &Storage32Impl_Vtbl; - This->base.pssVtbl = &IPropertySetStorage_Vtbl; + This->base.IPropertySetStorage_iface.lpVtbl = &IPropertySetStorage_Vtbl; This->base.baseVtbl = &StorageImpl_BaseVtbl; This->base.openFlags = (openFlags & ~STGM_CREATE); This->base.ref = 1; @@ -5095,8 +5095,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage, (*result)->base.IStorage_iface.lpVtbl = &TransactedSnapshotImpl_Vtbl; /* This is OK because the property set storage functions use the IStorage functions. */ - (*result)->base.pssVtbl = parentStorage->pssVtbl; - + (*result)->base.IPropertySetStorage_iface.lpVtbl = parentStorage->IPropertySetStorage_iface.lpVtbl; (*result)->base.baseVtbl = &TransactedSnapshotImpl_BaseVtbl; list_init(&(*result)->base.strmHead); @@ -5693,7 +5692,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct( * Initialize the virtual function table. */ newStorage->base.IStorage_iface.lpVtbl = &Storage32InternalImpl_Vtbl; - newStorage->base.pssVtbl = &IPropertySetStorage_Vtbl; + newStorage->base.IPropertySetStorage_iface.lpVtbl = &IPropertySetStorage_Vtbl; newStorage->base.baseVtbl = &StorageInternalImpl_BaseVtbl; newStorage->base.openFlags = (openFlags & ~STGM_CREATE); @@ -9519,7 +9518,7 @@ HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid) /* clear the output args */ *pclsid = CLSID_NULL; - res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte); + res = IStream_Read(pStm, pclsid, sizeof(CLSID), &nbByte); if (FAILED(res)) return res; diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index d94740d..80fe01b 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -176,7 +176,7 @@ HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName struct StorageBaseImpl { IStorage IStorage_iface; - const IPropertySetStorageVtbl *pssVtbl; /* interface for adding a properties stream */ + IPropertySetStorage IPropertySetStorage_iface; /* interface for adding a properties stream */ LONG ref; /*
1
0
0
0
Francois Gouget : appwiz.cpl: Only offer to download an addon if its installer is missing.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 0f36dc8df8e057d3e97670df0d1d77a6690e45fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f36dc8df8e057d3e97670df0…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Jul 16 10:09:32 2012 +0200 appwiz.cpl: Only offer to download an addon if its installer is missing. --- dlls/appwiz.cpl/addons.c | 49 +++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 20 deletions(-) diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index 8e93dee..b2445d4 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -175,25 +175,31 @@ static void set_status(DWORD id) SendMessageW(status, WM_SETTEXT, 0, (LPARAM)buf); } -static BOOL install_file(const WCHAR *file_name) +enum install_res { + INSTALL_OK = 0, + INSTALL_FAILED, + INSTALL_NEXT, +}; + +static enum install_res install_file(const WCHAR *file_name) { ULONG res; res = MsiInstallProductW(file_name, NULL); if(res != ERROR_SUCCESS) { ERR("MsiInstallProduct failed: %u\n", res); - return FALSE; + return INSTALL_FAILED; } - return TRUE; + return INSTALL_OK; } -static BOOL install_from_unix_file(const char *dir, const char *subdir, const char *file_name) +static enum install_res install_from_unix_file(const char *dir, const char *subdir, const char *file_name) { LPWSTR dos_file_name; char *file_path; int fd, len; - BOOL ret; + enum install_res ret; static WCHAR * (CDECL *wine_get_dos_file_name)(const char*); static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; @@ -201,7 +207,7 @@ static BOOL install_from_unix_file(const char *dir, const char *subdir, const ch len = strlen(dir); file_path = heap_alloc(len+strlen(subdir)+strlen(file_name)+3); if(!file_path) - return FALSE; + return INSTALL_FAILED; memcpy(file_path, dir, len); if(len && file_path[len-1] != '/' && file_path[len-1] != '\\') @@ -217,7 +223,7 @@ static BOOL install_from_unix_file(const char *dir, const char *subdir, const ch if(fd == -1) { TRACE("%s not found\n", debugstr_a(file_path)); heap_free(file_path); - return FALSE; + return INSTALL_NEXT; } close(fd); @@ -230,7 +236,7 @@ static BOOL install_from_unix_file(const char *dir, const char *subdir, const ch if(!dos_file_name) { ERR("Could not get dos file name of %s\n", debugstr_a(file_path)); heap_free(file_path); - return FALSE; + return INSTALL_FAILED; } } else { /* Windows mode */ UINT res; @@ -265,16 +271,16 @@ static HKEY open_config_key(void) return res == ERROR_SUCCESS ? ret : NULL; } -static BOOL install_from_registered_dir(void) +static enum install_res install_from_registered_dir(void) { char *package_dir; HKEY hkey; DWORD res, type, size = MAX_PATH; - BOOL ret; + enum install_res ret; hkey = open_config_key(); if(!hkey) - return FALSE; + return INSTALL_NEXT; package_dir = heap_alloc(size); res = RegGetValueA(hkey, NULL, addon->dir_config_key, RRF_RT_ANY, &type, (PBYTE)package_dir, &size); @@ -283,9 +289,12 @@ static BOOL install_from_registered_dir(void) res = RegGetValueA(hkey, NULL, addon->dir_config_key, RRF_RT_ANY, &type, (PBYTE)package_dir, &size); } RegCloseKey(hkey); - if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) { + if(res == ERROR_FILE_NOT_FOUND) { heap_free(package_dir); - return FALSE; + return INSTALL_NEXT; + } else if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) { + heap_free(package_dir); + return INSTALL_FAILED; } TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name)); @@ -296,7 +305,7 @@ static BOOL install_from_registered_dir(void) return ret; } -static BOOL install_from_default_dir(void) +static enum install_res install_from_default_dir(void) { const char *data_dir, *package_dir; char *dir_buf = NULL; @@ -312,15 +321,15 @@ static BOOL install_from_default_dir(void) strcpy(dir_buf+len, "/../"); package_dir = dir_buf; }else { - return FALSE; + return INSTALL_NEXT; } ret = install_from_unix_file(package_dir, addon->subdir_name, addon->file_name); heap_free(dir_buf); - if (!ret) + if (ret == INSTALL_NEXT) ret = install_from_unix_file(INSTALL_DATADIR "/wine/", addon->subdir_name, addon->file_name); - if (!ret && strcmp(INSTALL_DATADIR, "/usr/share")) + if (ret == INSTALL_NEXT && strcmp(INSTALL_DATADIR, "/usr/share")) ret = install_from_unix_file("/usr/share/wine/", addon->subdir_name, addon->file_name); return ret; } @@ -588,9 +597,9 @@ BOOL install_addon(addon_t addon_type) * - /usr/share/wine/$addon_subdir/ * - download from URL stored in $url_config_key value of HKCU/Wine/Software/$config_key key */ - if(!install_from_registered_dir() - && !install_from_default_dir() - && (url = get_url())) + if (install_from_registered_dir() == INSTALL_NEXT + && install_from_default_dir() == INSTALL_NEXT + && (url = get_url())) DialogBoxW(hInst, addon->dialog_template, 0, installer_proc); heap_free(url);
1
0
0
0
Nozomi Kodama : d3dx9: Implementation of D3DXSHMultiply2.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: f757f3fb7d8a1cccecc496834d8d82516676792f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f757f3fb7d8a1cccecc496834…
Author: Nozomi Kodama <Nozomi.Kodama(a)yahoo.com> Date: Fri Jul 13 02:53:18 2012 +0200 d3dx9: Implementation of D3DXSHMultiply2. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/math.c | 17 +++++++++++++++++ dlls/d3dx9_36/tests/math.c | 23 +++++++++++++++++++++++ include/d3dx9math.h | 1 + 4 files changed, 42 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 58e8636..9230d55 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -279,7 +279,7 @@ @ stub D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) @ stub D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) @ stub D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) -@ stub D3DXSHMultiply2(ptr ptr ptr) +@ stdcall D3DXSHMultiply2(ptr ptr ptr) @ stdcall D3DXSHMultiply3(ptr ptr ptr) @ stub D3DXSHMultiply4(ptr ptr ptr) @ stub D3DXSHMultiply5(ptr ptr ptr) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 2406929..79a0bca 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -1995,6 +1995,23 @@ FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b) return s; } +FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b) +{ + FLOAT ta, tb; + + TRACE("(%p, %p, %p)\n", out, a, b); + + ta = 0.28209479f * a[0]; + tb = 0.28209479f * b[0]; + + out[0]= 0.28209479f * D3DXSHDot(2, a, b); + out[1] = ta * b[1] + tb * a[1]; + out[2] = ta * b[2] + tb * a[2]; + out[3] = ta * b[3] + tb * a[3]; + + return out; +} + FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b) { FLOAT t, ta, tb; diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 018081c..66d4689 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -2422,6 +2422,28 @@ static void test_D3DXSHDot(void) return; } +static void test_D3DXSHMultiply2(void) +{ + unsigned int i; + FLOAT a[20], b[20], c[20]; + /* D3DXSHMultiply2 only modifies the first 4 elements of the array */ + const FLOAT expected[20] = + { 3.418594f, 1.698211f, 1.703853f, 1.709494f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, + 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f }; + + for (i = 0; i < 20; i++) + { + a[i] = 1.0f + i / 100.0f; + b[i] = 3.0f - i / 100.0f; + c[i] = i; + } + + D3DXSHMultiply2(c, a, b); + for (i = 0; i < 20; i++) + ok(relative_error(c[i], expected[i]) < admitted_error, "Expected[%d] = %f, received = %f\n", i, expected[i], c[i]); +} + static void test_D3DXSHMultiply3(void) { unsigned int i; @@ -2490,6 +2512,7 @@ START_TEST(math) test_D3DXFloat_Array(); test_D3DXSHAdd(); test_D3DXSHDot(); + test_D3DXSHMultiply2(); test_D3DXSHMultiply3(); test_D3DXSHScale(); } diff --git a/include/d3dx9math.h b/include/d3dx9math.h index e31d432..ab3e2b0 100644 --- a/include/d3dx9math.h +++ b/include/d3dx9math.h @@ -379,6 +379,7 @@ FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, CONST D3DXFLOAT16 *pin, UINT n); FLOAT* WINAPI D3DXSHAdd(FLOAT *out, UINT order, CONST FLOAT *a, CONST FLOAT *b); FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b); +FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b); FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, CONST FLOAT *a, CONST FLOAT *b); FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, CONST FLOAT *a, CONST FLOAT scale);
1
0
0
0
André Hentschel : ntdll: Add support for relay debugging on ARM.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 1ceec8c78982d7ef5124e86a8da53166473e1f4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ceec8c78982d7ef5124e86a8…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jul 15 16:45:01 2012 +0200 ntdll: Add support for relay debugging on ARM. --- dlls/ntdll/relay.c | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 3588f1c..b3c4aea 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(relay); -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) WINE_DECLARE_DEBUG_CHANNEL(timestamp); @@ -355,6 +355,37 @@ __ASM_GLOBAL_FUNC( call_entry_point, __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t") "ret" ) +#elif defined(__arm__) +__ASM_GLOBAL_FUNC( call_entry_point, + "push {r4, r5, LR}\n\t" + "mov r4, r0\n\t" + "mov r5, SP\n\t" + "lsl r3, r1, #2\n\t" + "cmp r3, #0\n\t" + "beq 5f\n\t" + "sub SP, SP, r3\n\t" + "bic SP, SP, #15\n\t" + "1:\tsub r3, r3, #4\n\t" + "ldr r0, [r2, r3]\n\t" + "str r0, [SP, r3]\n\t" + "cmp r3, #0\n\t" + "bgt 1b\n\t" + "cmp r1, #1\n\t" + "bgt 2f\n\t" + "pop {r0}\n\t" + "b 5f\n\t" + "2:\tcmp r1, #2\n\t" + "bgt 3f\n\t" + "pop {r0-r1}\n\t" + "b 5f\n\t" + "3:\tcmp r1, #3\n\t" + "bgt 4f\n\t" + "pop {r0-r2}\n\t" + "b 5f\n\t" + "4:\tpop {r0-r3}\n\t" + "5:\tblx r4\n\t" + "mov SP, r5\n\t" + "pop {r4, r5, PC}" ) #else __ASM_GLOBAL_FUNC( call_entry_point, "pushq %rbp\n\t"
1
0
0
0
André Hentschel : winebuild: Generate relay debugging thunks for ARM.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 83b60a7b0d592850c4d6b5cf3a43e71dd5cbdba2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83b60a7b0d592850c4d6b5cf3…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Sun Jul 15 16:41:56 2012 +0200 winebuild: Generate relay debugging thunks for ARM. --- tools/winebuild/spec32.c | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 3dff304..7892f22 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -83,7 +83,7 @@ int has_relays( DLLSPEC *spec ) { int i; - if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64) return 0; + if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64 && target_cpu != CPU_ARM) return 0; for (i = spec->base; i <= spec->limit; i++) { @@ -210,6 +210,34 @@ static void output_relay_debug( DLLSPEC *spec ) } break; + case CPU_ARM: + switch (args) + { + default: output( "\tpush {r0-r3}\n" ); break; + case 3: output( "\tpush {r0-r2}\n" ); break; + case 2: output( "\tpush {r0-r1}\n" ); break; + case 1: output( "\tpush {r0}\n" ); break; + case 0: break; + } + output( "\tpush {LR}\n" ); + output( "\tmov r2, SP\n"); + if (odp->flags & FLAG_RET64) flags |= 1; + output( "\tmov r1, #%u\n", (flags << 24) ); + if (args) output( "\tadd r1, #%u\n", (args << 16) ); + if ((i - spec->base) & 0xf000) output( "\tadd r1, #%u\n", (i - spec->base) & 0xf000 ); + if ((i - spec->base) & 0x0f00) output( "\tadd r1, #%u\n", (i - spec->base) & 0x0f00 ); + if ((i - spec->base) & 0x00f0) output( "\tadd r1, #%u\n", (i - spec->base) & 0x00f0 ); + if ((i - spec->base) & 0x000f) output( "\tadd r1, #%u\n", (i - spec->base) & 0x000f ); + output( "\tldr r0, [PC, #0]\n"); + output( "\tmov PC, PC\n"); + output( "\t.long .L__wine_spec_relay_descr\n" ); + output( "\tldr r3, [r0, #4]\n"); + output( "\tblx r3\n"); + output( "\tpop {r3}\n" ); + if (args) output( "\tadd SP, SP, #%u\n", min(args*4, 16) ); + output( "\tbx r3\n"); + break; + case CPU_x86_64: output( "\tsubq $40,%%rsp\n" ); output_cfi( ".cfi_adjust_cfa_offset 40" );
1
0
0
0
Alexandre Julliard : gdiplus: Avoid out of bounds access warning.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 9ff2bbc3c8bdcb2113af9012b2ba0b7521c79ea1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ff2bbc3c8bdcb2113af9012b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 16 14:28:31 2012 +0200 gdiplus: Avoid out of bounds access warning. --- dlls/gdiplus/tests/image.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 750b084..1f5ace1 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -3317,6 +3317,7 @@ static void test_tiff_palette(void) ColorPalette pal; ARGB entry[256]; } palette; + ARGB *entries = palette.pal.Entries; /* 1bpp TIFF without palette */ image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data)); @@ -3346,8 +3347,8 @@ todo_wine expect(2, palette.pal.Count); if (palette.pal.Count == 2) { - ok(palette.pal.Entries[0] == 0xff000000, "expected 0xff000000, got %#x\n", palette.pal.Entries[0]); - ok(palette.pal.Entries[1] == 0xffffffff, "expected 0xffffffff, got %#x\n", palette.pal.Entries[1]); + ok(entries[0] == 0xff000000, "expected 0xff000000, got %#x\n", entries[0]); + ok(entries[1] == 0xffffffff, "expected 0xffffffff, got %#x\n", entries[1]); } GdipDisposeImage(image);
1
0
0
0
Alexandre Julliard : wined3d: Remove unused variables.
by Alexandre Julliard
16 Jul '12
16 Jul '12
Module: wine Branch: master Commit: 30e0e3ffff998397ba8fb45f6b6e99ac58e92de7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30e0e3ffff998397ba8fb45f6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 16 14:26:32 2012 +0200 wined3d: Remove unused variables. --- dlls/wined3d/surface.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index f5cc3f5..21028ba 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2553,7 +2553,6 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P struct wined3d_format format; UINT update_w, update_h; UINT dst_w, dst_h; - UINT src_w, src_h; RECT r, dst_rect; UINT src_pitch; POINT p; @@ -2598,9 +2597,6 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P return WINED3DERR_INVALIDCALL; } - src_w = src_surface->resource.width; - src_h = src_surface->resource.height; - dst_w = dst_surface->resource.width; dst_h = dst_surface->resource.height;
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
72
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
Results per page:
10
25
50
100
200