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
December 2010
----- 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
1099 discussions
Start a n
N
ew thread
Michael Stefaniuc : mshtml: COM cleanup for the IMonikerProp iface.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: 7e32a1abb31fe5667a586bce40b0afda2136e949 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e32a1abb31fe5667a586bce4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:12:25 2010 +0100 mshtml: COM cleanup for the IMonikerProp iface. --- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/mshtml_private.h | 3 +-- dlls/mshtml/persist.c | 15 +++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 90cafd7..486eefa 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1740,7 +1740,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IPersistFile_iface; }else if(IsEqualGUID(&IID_IMonikerProp, riid)) { TRACE("(%p)->(IID_IMonikerProp, %p)\n", This, ppv); - *ppv = MONPROP(This); + *ppv = &This->IMonikerProp_iface; }else if(IsEqualGUID(&IID_IOleObject, riid)) { TRACE("(%p)->(IID_IOleObject, %p)\n", This, ppv); *ppv = OLEOBJ(This); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 9059ded..62a2adf 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -350,7 +350,7 @@ struct HTMLDocument { IPersistMoniker IPersistMoniker_iface; IPersistFile IPersistFile_iface; IPersistHistory IPersistHistory_iface; - const IMonikerPropVtbl *lpMonikerPropVtbl; + IMonikerProp IMonikerProp_iface; const IOleObjectVtbl *lpOleObjectVtbl; const IOleDocumentVtbl *lpOleDocumentVtbl; const IOleDocumentViewVtbl *lpOleDocumentViewVtbl; @@ -626,7 +626,6 @@ struct HTMLDocumentNode { #define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) #define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl) -#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl) #define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl) #define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl) #define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 46d00a3..24d3c21 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -466,29 +466,32 @@ static const IPersistMonikerVtbl PersistMonikerVtbl = { * IMonikerProp implementation */ -#define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface) +static inline HTMLDocument *impl_from_IMonikerProp(IMonikerProp *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocument, IMonikerProp_iface); +} static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_query_interface(This, riid, ppv); } static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_addref(This); } static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_release(This); } static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val)); @@ -835,7 +838,7 @@ void HTMLDocument_Persist_Init(HTMLDocument *This) { This->IPersistMoniker_iface.lpVtbl = &PersistMonikerVtbl; This->IPersistFile_iface.lpVtbl = &PersistFileVtbl; - This->lpMonikerPropVtbl = &MonikerPropVtbl; + This->IMonikerProp_iface.lpVtbl = &MonikerPropVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IPersistHistory_iface.lpVtbl = &PersistHistoryVtbl; }
1
0
0
0
Michael Stefaniuc : wuapi: Use an iface instead of a vtbl pointer in wucf.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: af4c6c8155b606c61a6b12ff76ff661117ba9654 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af4c6c8155b606c61a6b12ff7…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:11:33 2010 +0100 wuapi: Use an iface instead of a vtbl pointer in wucf. --- dlls/wuapi/main.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/wuapi/main.c b/dlls/wuapi/main.c index b6ec061..06b271e 100644 --- a/dlls/wuapi/main.c +++ b/dlls/wuapi/main.c @@ -39,13 +39,13 @@ typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); typedef struct _wucf { - const struct IClassFactoryVtbl *vtbl; + IClassFactory IClassFactory_iface; fnCreateInstance pfnCreateInstance; } wucf; static inline wucf *impl_from_IClassFactory( IClassFactory *iface ) { - return (wucf *)((char *)iface - FIELD_OFFSET( wucf, vtbl )); + return CONTAINING_RECORD(iface, wucf, IClassFactory_iface); } static HRESULT WINAPI wucf_QueryInterface( IClassFactory *iface, REFIID riid, LPVOID *ppobj ) @@ -112,8 +112,8 @@ static const struct IClassFactoryVtbl wucf_vtbl = wucf_LockServer }; -static wucf sessioncf = { &wucf_vtbl, UpdateSession_create }; -static wucf updatescf = { &wucf_vtbl, AutomaticUpdates_create }; +static wucf sessioncf = { { &wucf_vtbl }, UpdateSession_create }; +static wucf updatescf = { { &wucf_vtbl }, AutomaticUpdates_create }; static HINSTANCE instance; @@ -141,11 +141,11 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (IsEqualGUID( rclsid, &CLSID_UpdateSession )) { - cf = (IClassFactory *)&sessioncf.vtbl; + cf = &sessioncf.IClassFactory_iface; } else if (IsEqualGUID( rclsid, &CLSID_AutomaticUpdates )) { - cf = (IClassFactory *)&updatescf.vtbl; + cf = &updatescf.IClassFactory_iface; } if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv );
1
0
0
0
Michael Stefaniuc : avifil32: Use an iface instead of a vtbl pointer in ITmpFileImpl.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: 9b1a6a5d408aa272d0e4c8baf7015f2cce440896 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b1a6a5d408aa272d0e4c8baf…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:10:03 2010 +0100 avifil32: Use an iface instead of a vtbl pointer in ITmpFileImpl. --- dlls/avifil32/tmpfile.c | 169 ++++++++++++++++++++++------------------------ 1 files changed, 81 insertions(+), 88 deletions(-) diff --git a/dlls/avifil32/tmpfile.c b/dlls/avifil32/tmpfile.c index 49b5a0a..3bdd50a 100644 --- a/dlls/avifil32/tmpfile.c +++ b/dlls/avifil32/tmpfile.c @@ -34,102 +34,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(avifile); /***********************************************************************/ -static HRESULT WINAPI ITmpFile_fnQueryInterface(IAVIFile* iface,REFIID refiid,LPVOID *obj); -static ULONG WINAPI ITmpFile_fnAddRef(IAVIFile* iface); -static ULONG WINAPI ITmpFile_fnRelease(IAVIFile* iface); -static HRESULT WINAPI ITmpFile_fnInfo(IAVIFile*iface,AVIFILEINFOW*afi,LONG size); -static HRESULT WINAPI ITmpFile_fnGetStream(IAVIFile*iface,PAVISTREAM*avis,DWORD fccType,LONG lParam); -static HRESULT WINAPI ITmpFile_fnCreateStream(IAVIFile*iface,PAVISTREAM*avis,AVISTREAMINFOW*asi); -static HRESULT WINAPI ITmpFile_fnWriteData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG size); -static HRESULT WINAPI ITmpFile_fnReadData(IAVIFile*iface,DWORD ckid,LPVOID lpData,LONG *size); -static HRESULT WINAPI ITmpFile_fnEndRecord(IAVIFile*iface); -static HRESULT WINAPI ITmpFile_fnDeleteStream(IAVIFile*iface,DWORD fccType,LONG lParam); - -static const struct IAVIFileVtbl itmpft = { - ITmpFile_fnQueryInterface, - ITmpFile_fnAddRef, - ITmpFile_fnRelease, - ITmpFile_fnInfo, - ITmpFile_fnGetStream, - ITmpFile_fnCreateStream, - ITmpFile_fnWriteData, - ITmpFile_fnReadData, - ITmpFile_fnEndRecord, - ITmpFile_fnDeleteStream -}; - typedef struct _ITmpFileImpl { - /* IUnknown stuff */ - const IAVIFileVtbl *lpVtbl; + IAVIFile IAVIFile_iface; LONG ref; - /* IAVIFile stuff */ AVIFILEINFOW fInfo; PAVISTREAM *ppStreams; } ITmpFileImpl; -PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) { - ITmpFileImpl *tmpFile; - int i; - - tmpFile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ITmpFileImpl)); - if (tmpFile == NULL) - return NULL; - - tmpFile->lpVtbl = &itmpft; - tmpFile->ref = 1; - memset(&tmpFile->fInfo, 0, sizeof(tmpFile->fInfo)); - - tmpFile->fInfo.dwStreams = nStreams; - tmpFile->ppStreams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(PAVISTREAM)); - if (tmpFile->ppStreams == NULL) { - HeapFree(GetProcessHeap(), 0, tmpFile); - return NULL; - } - - for (i = 0; i < nStreams; i++) { - AVISTREAMINFOW sInfo; - - tmpFile->ppStreams[i] = ppStreams[i]; - - AVIStreamAddRef(ppStreams[i]); - AVIStreamInfoW(ppStreams[i], &sInfo, sizeof(sInfo)); - if (i == 0) { - tmpFile->fInfo.dwScale = sInfo.dwScale; - tmpFile->fInfo.dwRate = sInfo.dwRate; - if (!sInfo.dwScale || !sInfo.dwRate) { - tmpFile->fInfo.dwScale = 1; - tmpFile->fInfo.dwRate = 100; - } - } - - if (tmpFile->fInfo.dwSuggestedBufferSize < sInfo.dwSuggestedBufferSize) - tmpFile->fInfo.dwSuggestedBufferSize = sInfo.dwSuggestedBufferSize; - - { - register DWORD tmp; - - tmp = MulDiv(AVIStreamSampleToTime(ppStreams[i], sInfo.dwLength), - tmpFile->fInfo.dwScale, tmpFile->fInfo.dwRate * 1000); - if (tmpFile->fInfo.dwLength < tmp) - tmpFile->fInfo.dwLength = tmp; - - tmp = sInfo.rcFrame.right - sInfo.rcFrame.left; - if (tmpFile->fInfo.dwWidth < tmp) - tmpFile->fInfo.dwWidth = tmp; - tmp = sInfo.rcFrame.bottom - sInfo.rcFrame.top; - if (tmpFile->fInfo.dwHeight < tmp) - tmpFile->fInfo.dwHeight = tmp; - } - } - - return (PAVIFILE)tmpFile; +static inline ITmpFileImpl *impl_from_IAVIFile(IAVIFile *iface) +{ + return CONTAINING_RECORD(iface, ITmpFileImpl, IAVIFile_iface); } static HRESULT WINAPI ITmpFile_fnQueryInterface(IAVIFile *iface, REFIID refiid, LPVOID *obj) { - ITmpFileImpl *This = (ITmpFileImpl *)iface; + ITmpFileImpl *This = impl_from_IAVIFile(iface); TRACE("(%p,%s,%p)\n", This, debugstr_guid(refiid), obj); @@ -146,7 +67,7 @@ static HRESULT WINAPI ITmpFile_fnQueryInterface(IAVIFile *iface, REFIID refiid, static ULONG WINAPI ITmpFile_fnAddRef(IAVIFile *iface) { - ITmpFileImpl *This = (ITmpFileImpl *)iface; + ITmpFileImpl *This = impl_from_IAVIFile(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) -> %d\n", iface, ref); @@ -156,7 +77,7 @@ static ULONG WINAPI ITmpFile_fnAddRef(IAVIFile *iface) static ULONG WINAPI ITmpFile_fnRelease(IAVIFile *iface) { - ITmpFileImpl *This = (ITmpFileImpl *)iface; + ITmpFileImpl *This = impl_from_IAVIFile(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) -> %d\n", iface, ref); @@ -182,7 +103,7 @@ static ULONG WINAPI ITmpFile_fnRelease(IAVIFile *iface) static HRESULT WINAPI ITmpFile_fnInfo(IAVIFile *iface, AVIFILEINFOW *afi, LONG size) { - ITmpFileImpl *This = (ITmpFileImpl *)iface; + ITmpFileImpl *This = impl_from_IAVIFile(iface); TRACE("(%p,%p,%d)\n",iface,afi,size); @@ -201,7 +122,7 @@ static HRESULT WINAPI ITmpFile_fnInfo(IAVIFile *iface, static HRESULT WINAPI ITmpFile_fnGetStream(IAVIFile *iface, PAVISTREAM *avis, DWORD fccType, LONG lParam) { - ITmpFileImpl *This = (ITmpFileImpl *)iface; + ITmpFileImpl *This = impl_from_IAVIFile(iface); ULONG nStream = (ULONG)-1; @@ -283,3 +204,75 @@ static HRESULT WINAPI ITmpFile_fnDeleteStream(IAVIFile *iface, DWORD fccType, return AVIERR_UNSUPPORTED; } + +static const struct IAVIFileVtbl itmpft = { + ITmpFile_fnQueryInterface, + ITmpFile_fnAddRef, + ITmpFile_fnRelease, + ITmpFile_fnInfo, + ITmpFile_fnGetStream, + ITmpFile_fnCreateStream, + ITmpFile_fnWriteData, + ITmpFile_fnReadData, + ITmpFile_fnEndRecord, + ITmpFile_fnDeleteStream +}; + +PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) +{ + ITmpFileImpl *tmpFile; + int i; + + tmpFile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ITmpFileImpl)); + if (tmpFile == NULL) + return NULL; + + tmpFile->IAVIFile_iface.lpVtbl = &itmpft; + tmpFile->ref = 1; + memset(&tmpFile->fInfo, 0, sizeof(tmpFile->fInfo)); + + tmpFile->fInfo.dwStreams = nStreams; + tmpFile->ppStreams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(PAVISTREAM)); + if (tmpFile->ppStreams == NULL) { + HeapFree(GetProcessHeap(), 0, tmpFile); + return NULL; + } + + for (i = 0; i < nStreams; i++) { + AVISTREAMINFOW sInfo; + + tmpFile->ppStreams[i] = ppStreams[i]; + + AVIStreamAddRef(ppStreams[i]); + AVIStreamInfoW(ppStreams[i], &sInfo, sizeof(sInfo)); + if (i == 0) { + tmpFile->fInfo.dwScale = sInfo.dwScale; + tmpFile->fInfo.dwRate = sInfo.dwRate; + if (!sInfo.dwScale || !sInfo.dwRate) { + tmpFile->fInfo.dwScale = 1; + tmpFile->fInfo.dwRate = 100; + } + } + + if (tmpFile->fInfo.dwSuggestedBufferSize < sInfo.dwSuggestedBufferSize) + tmpFile->fInfo.dwSuggestedBufferSize = sInfo.dwSuggestedBufferSize; + + { + register DWORD tmp; + + tmp = MulDiv(AVIStreamSampleToTime(ppStreams[i], sInfo.dwLength), + tmpFile->fInfo.dwScale, tmpFile->fInfo.dwRate * 1000); + if (tmpFile->fInfo.dwLength < tmp) + tmpFile->fInfo.dwLength = tmp; + + tmp = sInfo.rcFrame.right - sInfo.rcFrame.left; + if (tmpFile->fInfo.dwWidth < tmp) + tmpFile->fInfo.dwWidth = tmp; + tmp = sInfo.rcFrame.bottom - sInfo.rcFrame.top; + if (tmpFile->fInfo.dwHeight < tmp) + tmpFile->fInfo.dwHeight = tmp; + } + } + + return (PAVIFILE)tmpFile; +}
1
0
0
0
Michael Stefaniuc : inkobj: Remove inkcollector.c as it is dead code.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: fd7e34f195d334f9e17cec5ca73ca6c62f2c5c86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd7e34f195d334f9e17cec5ca…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:07:21 2010 +0100 inkobj: Remove inkcollector.c as it is dead code. --- dlls/inkobj/Makefile.in | 1 - dlls/inkobj/inkcollector.c | 413 -------------------------------------------- 2 files changed, 0 insertions(+), 414 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fd7e34f195d334f9e17ce…
1
0
0
0
Michael Stefaniuc : msctf: Standardize the COM usage in documentmgr.c.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: 6aaf2aa30b28efd1738fd2345f623e6ee9c44d8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6aaf2aa30b28efd1738fd2345…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:04:10 2010 +0100 msctf: Standardize the COM usage in documentmgr.c. --- dlls/msctf/documentmgr.c | 84 +++++++++++++++++++++++++-------------------- 1 files changed, 47 insertions(+), 37 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6aaf2aa30b28efd1738fd…
1
0
0
0
Michael Stefaniuc : msxml3: Standardize the COM usage in xmlelem.c.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: e803e6347c7182c600d19bf7c3e9f27889d4958a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e803e6347c7182c600d19bf7c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:03:06 2010 +0100 msxml3: Standardize the COM usage in xmlelem.c. --- dlls/msxml3/xmlelem.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/msxml3/xmlelem.c b/dlls/msxml3/xmlelem.c index dbc5a80..a15b311 100644 --- a/dlls/msxml3/xmlelem.c +++ b/dlls/msxml3/xmlelem.c @@ -45,7 +45,7 @@ static HRESULT XMLElementCollection_create( IUnknown *pUnkOuter, xmlNodePtr node */ typedef struct _xmlelem { - const IXMLElementVtbl *lpVtbl; + IXMLElement IXMLElement_iface; LONG ref; xmlNodePtr node; BOOL own; @@ -53,7 +53,7 @@ typedef struct _xmlelem static inline xmlelem *impl_from_IXMLElement(IXMLElement *iface) { - return (xmlelem *)((char*)iface - FIELD_OFFSET(xmlelem, lpVtbl)); + return CONTAINING_RECORD(iface, xmlelem, IXMLElement_iface); } static HRESULT WINAPI xmlelem_QueryInterface(IXMLElement *iface, REFIID riid, void** ppvObject) @@ -165,7 +165,7 @@ static HRESULT WINAPI xmlelem_Invoke(IXMLElement *iface, DISPID dispIdMember, hr = get_typeinfo(IXMLElement_tid, &typeinfo); if(SUCCEEDED(hr)) { - hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, + hr = ITypeInfo_Invoke(typeinfo, &This->IXMLElement_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); ITypeInfo_Release(typeinfo); } @@ -493,12 +493,12 @@ HRESULT XMLElement_create(IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj, B if(!elem) return E_OUTOFMEMORY; - elem->lpVtbl = &xmlelem_vtbl; + elem->IXMLElement_iface.lpVtbl = &xmlelem_vtbl; elem->ref = 1; elem->node = node; elem->own = own; - *ppObj = &elem->lpVtbl; + *ppObj = &elem->IXMLElement_iface; TRACE("returning iface %p\n", *ppObj); return S_OK; @@ -509,8 +509,8 @@ HRESULT XMLElement_create(IUnknown *pUnkOuter, xmlNodePtr node, LPVOID *ppObj, B */ typedef struct _xmlelem_collection { - const IXMLElementCollectionVtbl *lpVtbl; - const IEnumVARIANTVtbl *lpvtblIEnumVARIANT; + IXMLElementCollection IXMLElementCollection_iface; + IEnumVARIANT IEnumVARIANT_iface; LONG ref; LONG length; xmlNodePtr node; @@ -534,12 +534,12 @@ static inline LONG xmlelem_collection_updatelength(xmlelem_collection *collectio static inline xmlelem_collection *impl_from_IXMLElementCollection(IXMLElementCollection *iface) { - return (xmlelem_collection *)((char*)iface - FIELD_OFFSET(xmlelem_collection, lpVtbl)); + return CONTAINING_RECORD(iface, xmlelem_collection, IXMLElementCollection_iface); } static inline xmlelem_collection *impl_from_IEnumVARIANT(IEnumVARIANT *iface) { - return (xmlelem_collection *)((char*)iface - FIELD_OFFSET(xmlelem_collection, lpvtblIEnumVARIANT)); + return CONTAINING_RECORD(iface, xmlelem_collection, IEnumVARIANT_iface); } static HRESULT WINAPI xmlelem_collection_QueryInterface(IXMLElementCollection *iface, REFIID riid, void** ppvObject) @@ -555,7 +555,7 @@ static HRESULT WINAPI xmlelem_collection_QueryInterface(IXMLElementCollection *i } else if (IsEqualGUID(riid, &IID_IEnumVARIANT)) { - *ppvObject = &(This->lpvtblIEnumVARIANT); + *ppvObject = &This->IEnumVARIANT_iface; } else { @@ -797,15 +797,15 @@ static HRESULT XMLElementCollection_create(IUnknown *pUnkOuter, xmlNodePtr node, if(!collection) return E_OUTOFMEMORY; - collection->lpVtbl = &xmlelem_collection_vtbl; - collection->lpvtblIEnumVARIANT = &xmlelem_collection_IEnumVARIANTvtbl; + collection->IXMLElementCollection_iface.lpVtbl = &xmlelem_collection_vtbl; + collection->IEnumVARIANT_iface.lpVtbl = &xmlelem_collection_IEnumVARIANTvtbl; collection->ref = 1; collection->length = 0; collection->node = node; collection->current = node->children; xmlelem_collection_updatelength(collection); - *ppObj = &collection->lpVtbl; + *ppObj = &collection->IXMLElementCollection_iface; TRACE("returning iface %p\n", *ppObj); return S_OK;
1
0
0
0
Michael Stefaniuc : msxml3: Use ifaces instead of vtbl pointers in xmldoc.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: 0c5492aaee4d4650e7ed009633dea1ccbbd95d81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c5492aaee4d4650e7ed00963…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 23 02:02:09 2010 +0100 msxml3: Use ifaces instead of vtbl pointers in xmldoc. --- dlls/msxml3/xmldoc.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c index 93ff499..b1488b8 100644 --- a/dlls/msxml3/xmldoc.c +++ b/dlls/msxml3/xmldoc.c @@ -48,8 +48,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); typedef struct _xmldoc { - const IXMLDocumentVtbl *lpVtbl; - const IPersistStreamInitVtbl *lpvtblIPersistStreamInit; + IXMLDocument IXMLDocument_iface; + IPersistStreamInit IPersistStreamInit_iface; LONG ref; HRESULT error; @@ -62,12 +62,12 @@ typedef struct _xmldoc static inline xmldoc *impl_from_IXMLDocument(IXMLDocument *iface) { - return (xmldoc *)((char*)iface - FIELD_OFFSET(xmldoc, lpVtbl)); + return CONTAINING_RECORD(iface, xmldoc, IXMLDocument_iface); } static inline xmldoc *impl_from_IPersistStreamInit(IPersistStreamInit *iface) { - return (xmldoc *)((char*)iface - FIELD_OFFSET(xmldoc, lpvtblIPersistStreamInit)); + return CONTAINING_RECORD(iface, xmldoc, IPersistStreamInit_iface); } static HRESULT WINAPI xmldoc_QueryInterface(IXMLDocument *iface, REFIID riid, void** ppvObject) @@ -85,7 +85,7 @@ static HRESULT WINAPI xmldoc_QueryInterface(IXMLDocument *iface, REFIID riid, vo else if (IsEqualGUID(&IID_IPersistStreamInit, riid) || IsEqualGUID(&IID_IPersistStream, riid)) { - *ppvObject = &(This->lpvtblIPersistStreamInit); + *ppvObject = &This->IPersistStreamInit_iface; } else { @@ -186,8 +186,8 @@ static HRESULT WINAPI xmldoc_Invoke(IXMLDocument *iface, DISPID dispIdMember, hr = get_typeinfo(IXMLDocument_tid, &typeinfo); if(SUCCEEDED(hr)) { - hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, - pVarResult, pExcepInfo, puArgErr); + hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDocument_iface, dispIdMember, wFlags, + pDispParams, pVarResult, pExcepInfo, puArgErr); ITypeInfo_Release(typeinfo); } @@ -555,21 +555,21 @@ static HRESULT WINAPI xmldoc_IPersistStreamInit_QueryInterface( IPersistStreamInit *iface, REFIID riid, LPVOID *ppvObj) { xmldoc *this = impl_from_IPersistStreamInit(iface); - return IXMLDocument_QueryInterface((IXMLDocument *)this, riid, ppvObj); + return IXMLDocument_QueryInterface(&this->IXMLDocument_iface, riid, ppvObj); } static ULONG WINAPI xmldoc_IPersistStreamInit_AddRef( IPersistStreamInit *iface) { xmldoc *this = impl_from_IPersistStreamInit(iface); - return IXMLDocument_AddRef((IXMLDocument *)this); + return IXMLDocument_AddRef(&this->IXMLDocument_iface); } static ULONG WINAPI xmldoc_IPersistStreamInit_Release( IPersistStreamInit *iface) { xmldoc *this = impl_from_IPersistStreamInit(iface); - return IXMLDocument_Release((IXMLDocument *)this); + return IXMLDocument_Release(&this->IXMLDocument_iface); } static HRESULT WINAPI xmldoc_IPersistStreamInit_GetClassID( @@ -702,14 +702,14 @@ HRESULT XMLDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) if(!doc) return E_OUTOFMEMORY; - doc->lpVtbl = &xmldoc_vtbl; - doc->lpvtblIPersistStreamInit = &xmldoc_IPersistStreamInit_VTable; + doc->IXMLDocument_iface.lpVtbl = &xmldoc_vtbl; + doc->IPersistStreamInit_iface.lpVtbl = &xmldoc_IPersistStreamInit_VTable; doc->ref = 1; doc->error = S_OK; doc->xmldoc = NULL; doc->stream = NULL; - *ppObj = &doc->lpVtbl; + *ppObj = &doc->IXMLDocument_iface; TRACE("returning iface %p\n", *ppObj); return S_OK;
1
0
0
0
Nikolay Sivov : oleaut32: Fix null parameters handling in ICreateTypeLib2:: CreateTypeInfo().
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: 623abfcaaed2f8809b7398984eea6d85f9162355 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=623abfcaaed2f8809b7398984…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Dec 22 23:50:51 2010 +0300 oleaut32: Fix null parameters handling in ICreateTypeLib2::CreateTypeInfo(). --- dlls/oleaut32/tests/typelib.c | 10 ++++++++++ dlls/oleaut32/typelib2.c | 11 ++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 495561a..aab340e 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1406,6 +1406,16 @@ static void test_CreateTypeLib(void) { SysFreeString(name); SysFreeString(helpfile); + /* invalid parameters */ + hres = ICreateTypeLib_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, &createti); + ok(hres == E_INVALIDARG, "got %08x\n", hres); + + hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, NULL); + ok(hres == E_INVALIDARG, "got %08x\n", hres); + + hres = ICreateTypeLib_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, NULL); + ok(hres == E_INVALIDARG, "got %08x\n", hres); + hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); ok(hres == S_OK, "got %08x\n", hres); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index e0e78ee..8fc8a92 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -4389,20 +4389,21 @@ static HRESULT WINAPI ICreateTypeLib2_fnCreateTypeInfo( ICreateTypeLib2 * iface, LPOLESTR szName, TYPEKIND tkind, - ICreateTypeInfo **ppCTInfo) + ICreateTypeInfo **tinfo) { ICreateTypeLib2Impl *This = (ICreateTypeLib2Impl *)iface; char *name; - TRACE("(%p,%s,%d,%p)\n", iface, debugstr_w(szName), tkind, ppCTInfo); + TRACE("(%p,%s,%d,%p)\n", iface, debugstr_w(szName), tkind, tinfo); + + if (!szName || !tinfo) return E_INVALIDARG; ctl2_encode_name(This, szName, &name); if(ctl2_find_name(This, name) != -1) return TYPE_E_NAMECONFLICT; - *ppCTInfo = (ICreateTypeInfo *)ICreateTypeInfo2_Constructor(This, szName, tkind); - - if (!*ppCTInfo) return E_OUTOFMEMORY; + *tinfo = (ICreateTypeInfo *)ICreateTypeInfo2_Constructor(This, szName, tkind); + if (!*tinfo) return E_OUTOFMEMORY; return S_OK; }
1
0
0
0
André Hentschel : qmgr/tests: Use a temporary path to avoid failures.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: c71998d742ff41b028ff4400b67d0f91658fb040 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c71998d742ff41b028ff4400b…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Dec 22 23:28:44 2010 +0100 qmgr/tests: Use a temporary path to avoid failures. --- dlls/qmgr/tests/job.c | 66 +++++++++--------------------------------------- 1 files changed, 13 insertions(+), 53 deletions(-) diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c index d0e2306..f972547 100644 --- a/dlls/qmgr/tests/job.c +++ b/dlls/qmgr/tests/job.c @@ -28,65 +28,26 @@ /* Globals used by many tests */ static const WCHAR test_displayName[] = {'T', 'e', 's', 't', 0}; -static const WCHAR test_remoteNameA[] = {'r','e','m','o','t','e','A', 0}; -static const WCHAR test_remoteNameB[] = {'r','e','m','o','t','e','B', 0}; -static const WCHAR test_localNameA[] = {'l','o','c','a','l','A', 0}; -static const WCHAR test_localNameB[] = {'l','o','c','a','l','B', 0}; -static WCHAR *test_currentDir; -static WCHAR *test_remotePathA; -static WCHAR *test_remotePathB; -static WCHAR *test_localPathA; -static WCHAR *test_localPathB; +static WCHAR test_remotePathA[MAX_PATH]; +static WCHAR test_remotePathB[MAX_PATH]; +static WCHAR test_localPathA[MAX_PATH]; +static WCHAR test_localPathB[MAX_PATH]; static IBackgroundCopyManager *test_manager; static IBackgroundCopyJob *test_job; static GUID test_jobId; static BG_JOB_TYPE test_type; -static BOOL init_paths(void) +static VOID init_paths(void) { - static const WCHAR format[] = {'%','s','\\','%','s', 0}; - DWORD n; + WCHAR tmpDir[MAX_PATH]; + WCHAR prefix[] = {'q', 'm', 'g', 'r', 0}; - n = GetCurrentDirectoryW(0, NULL); - if (n == 0) - { - skip("Couldn't get current directory size\n"); - return FALSE; - } - - test_currentDir = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); - test_localPathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameA)) * sizeof(WCHAR)); - test_localPathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameB)) * sizeof(WCHAR)); - test_remotePathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameA)) * sizeof(WCHAR)); - test_remotePathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameB)) * sizeof(WCHAR)); - - if (!test_currentDir || !test_localPathA || !test_localPathB - || !test_remotePathA || !test_remotePathB) - { - skip("Couldn't allocate memory for full paths\n"); - return FALSE; - } + GetTempPathW(MAX_PATH, tmpDir); - if (GetCurrentDirectoryW(n, test_currentDir) != n - 1) - { - skip("Couldn't get current directory\n"); - return FALSE; - } - - wsprintfW(test_localPathA, format, test_currentDir, test_localNameA); - wsprintfW(test_localPathB, format, test_currentDir, test_localNameB); - wsprintfW(test_remotePathA, format, test_currentDir, test_remoteNameA); - wsprintfW(test_remotePathB, format, test_currentDir, test_remoteNameB); - - return TRUE; + GetTempFileNameW(tmpDir, prefix, 0, test_localPathA); + GetTempFileNameW(tmpDir, prefix, 0, test_localPathB); + GetTempFileNameW(tmpDir, prefix, 0, test_remotePathA); + GetTempFileNameW(tmpDir, prefix, 0, test_remotePathB); } /* Generic test setup */ @@ -545,8 +506,7 @@ START_TEST(job) }; const test_t *test; - if (!init_paths()) - return; + init_paths(); CoInitialize(NULL);
1
0
0
0
Eryk Wieliczko : msvcrt/tests: Add _fcvt_s tests.
by Alexandre Julliard
23 Dec '10
23 Dec '10
Module: wine Branch: master Commit: b74ef16d99f3c2f7e4a0a7e453c71b6da2c70310 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b74ef16d99f3c2f7e4a0a7e45…
Author: Eryk Wieliczko <ewdevel(a)gmail.com> Date: Wed Dec 22 23:10:56 2010 +0100 msvcrt/tests: Add _fcvt_s tests. --- dlls/msvcrt/tests/printf.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index 87efd16..d32ef73 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -40,6 +40,8 @@ static int (__cdecl *p__vsnwprintf_s)(wchar_t *str, size_t sizeOfBuffer, __ms_va_list valist); static int (__cdecl *p__ecvt_s)(char *buffer, size_t length, double number, int ndigits, int *decpt, int *sign); +static int (__cdecl *p__fcvt_s)(char *buffer, size_t length, double number, + int ndigits, int *decpt, int *sign); static void init( void ) { @@ -49,6 +51,7 @@ static void init( void ) p__vscwprintf = (void *)GetProcAddress(hmod, "_vscwprintf"); p__vsnwprintf_s = (void *)GetProcAddress(hmod, "_vsnwprintf_s"); p__ecvt_s = (void *)GetProcAddress(hmod, "_ecvt_s"); + p__fcvt_s = (void *)GetProcAddress(hmod, "_fcvt_s"); } static void test_sprintf( void ) @@ -799,7 +802,7 @@ static void test_xcvt(void) "_fcvt() decimal point wrong, got %d expected %d\n", decpt, test_cvt_testcases[i].expdecpt_f); ok( sign == test_cvt_testcases[i].expsign, - "_ecvt() sign wrong, got %d expected %d\n", sign, + "_fcvt() sign wrong, got %d expected %d\n", sign, test_cvt_testcases[i].expsign); } @@ -823,7 +826,29 @@ static void test_xcvt(void) free(str); } else - win_skip("_ecvt_s not available\n"); + win_skip("_ecvt_s not available\n"); + + if (p__fcvt_s) + { + str = malloc(1024); + for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ + decpt = sign = 100; + err = p__fcvt_s(str, 1024, test_cvt_testcases[i].value, test_cvt_testcases[i].nrdigits, &decpt, &sign); + ok(err == 0, "_fcvt_s() failed with error code %d", err); + ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_f, 15), + "_fcvt_s() bad return, got \n'%s' expected \n'%s'\n", str, + test_cvt_testcases[i].expstr_e); + ok( decpt == test_cvt_testcases[i].expdecpt_f, + "_fcvt_s() decimal point wrong, got %d expected %d\n", decpt, + test_cvt_testcases[i].expdecpt_e); + ok( sign == test_cvt_testcases[i].expsign, + "_fcvt_s() sign wrong, got %d expected %d\n", sign, + test_cvt_testcases[i].expsign); + } + free(str); + } + else + todo_wine win_skip("_fcvt_s not available\n"); } static int __cdecl _vsnwprintf_wrapper(wchar_t *str, size_t len, const wchar_t *format, ...)
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200