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
February 2009
----- 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
965 discussions
Start a n
N
ew thread
Alexandre Julliard : kernel32/tests: Allow more error codes from GetDiskFreeSpace.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: bdfa9c3a1bcb134948175d0866df1af351f17bde URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdfa9c3a1bcb134948175d086…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 3 15:04:24 2009 +0100 kernel32/tests: Allow more error codes from GetDiskFreeSpace. --- dlls/kernel32/tests/drive.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/drive.c b/dlls/kernel32/tests/drive.c index a94cbdf..81e04bf 100644 --- a/dlls/kernel32/tests/drive.c +++ b/dlls/kernel32/tests/drive.c @@ -118,7 +118,10 @@ static void test_GetDiskFreeSpaceA(void) else { ok(ret || - (!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_DRIVE)), + GetLastError() == ERROR_NOT_READY || + GetLastError() == ERROR_INVALID_DRIVE || + GetLastError() == ERROR_PATH_NOT_FOUND || + GetLastError() == ERROR_UNRECOGNIZED_VOLUME, "GetDiskFreeSpaceA(%s): ret=%d GetLastError=%d\n", drive, ret, GetLastError()); if( GetVersion() & 0x80000000) @@ -132,7 +135,10 @@ static void test_GetDiskFreeSpaceA(void) tot.QuadPart = sectors_per_cluster; tot.QuadPart = (tot.QuadPart * bytes_per_sector) * total_clusters; ret = pGetDiskFreeSpaceExA( drive, &d, &totEx, NULL); - ok( ret || (!ret && ERROR_NOT_READY == GetLastError()), + ok( ret || + GetLastError() == ERROR_NOT_READY || + GetLastError() == ERROR_PATH_NOT_FOUND || + GetLastError() == ERROR_UNRECOGNIZED_VOLUME, "GetDiskFreeSpaceExA( %s ) failed. GetLastError=%d\n", drive, GetLastError()); ok( bytes_per_sector == 0 || /* empty cd rom drive */ totEx.QuadPart <= tot.QuadPart, @@ -188,7 +194,10 @@ static void test_GetDiskFreeSpaceW(void) "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n", drive[0], ret, GetLastError()); else - ok(ret || GetLastError() == ERROR_NOT_READY, + ok( ret || + GetLastError() == ERROR_NOT_READY || + GetLastError() == ERROR_PATH_NOT_FOUND || + GetLastError() == ERROR_UNRECOGNIZED_VOLUME, "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n", drive[0], ret, GetLastError()); }
1
0
0
0
Alexandre Julliard : kernel32/tests: Print some more details on directory test failures.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: e8d36ff9a1a430dd2c6c6ae80a3f3a2e7c967142 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8d36ff9a1a430dd2c6c6ae80…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 3 15:01:41 2009 +0100 kernel32/tests: Print some more details on directory test failures. --- dlls/kernel32/tests/directory.c | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/directory.c b/dlls/kernel32/tests/directory.c index 47e7701..2c943d1 100644 --- a/dlls/kernel32/tests/directory.c +++ b/dlls/kernel32/tests/directory.c @@ -339,27 +339,32 @@ static void test_CreateDirectoryW(void) ret = CreateDirectoryW(NULL, NULL); if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) return; - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, "should not create NULL path\n"); + ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, + "should not create NULL path ret %u err %u\n", ret, GetLastError()); ret = CreateDirectoryW(empty_strW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, "should not create empty path\n"); + ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, + "should not create empty path ret %u err %u\n", ret, GetLastError()); ret = GetSystemDirectoryW(tmpdir, MAX_PATH); ok(ret < MAX_PATH, "System directory should fit into MAX_PATH\n"); ret = SetCurrentDirectoryW(tmpdir); - ok(ret == TRUE, "could not chdir to the System directory\n"); + ok(ret == TRUE, "could not chdir to the System directory ret %u err %u\n", ret, GetLastError()); ret = CreateDirectoryW(dotW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, "should not create existing path\n"); + ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, + "should not create existing path ret %u err %u\n", ret, GetLastError()); ret = CreateDirectoryW(dotdotW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, "should not create existing path\n"); + ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, + "should not create existing path ret %u err %u\n", ret, GetLastError()); GetTempPathW(MAX_PATH, tmpdir); tmpdir[3] = 0; /* truncate the path */ ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ACCESS_DENIED, "should deny access to the drive root\n"); + ok(ret == FALSE && GetLastError() == ERROR_ACCESS_DENIED, + "should deny access to the drive root ret %u err %u\n", ret, GetLastError()); GetTempPathW(MAX_PATH, tmpdir); lstrcatW(tmpdir, tmp_dir_name); @@ -367,7 +372,8 @@ static void test_CreateDirectoryW(void) ok(ret == TRUE, "CreateDirectoryW should always succeed\n"); ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, "should not create existing path\n"); + ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, + "should not create existing path ret %u err %u\n", ret, GetLastError()); ret = RemoveDirectoryW(tmpdir); ok(ret == TRUE, "RemoveDirectoryW should always succeed\n"); @@ -391,8 +397,9 @@ static void test_CreateDirectoryW(void) lstrcatW(tmpdir, slashW); lstrcatW(tmpdir, tmp_dir_name); ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateDirectoryW with multiple nonexistent directories in path should fail\n"); + ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, + "CreateDirectoryW with multiple nonexistent directories in path should fail ret %u err %u\n", + ret, GetLastError()); ret = RemoveDirectoryW(tmpdir); }
1
0
0
0
Alistair Leslie-Hughes : shdocvw: OnAmbientPropertyChange should refresh all properties with a DISPID_UNKNOWN .
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 69a8066b18d07197da0e756c3f5be73283db70df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69a8066b18d07197da0e756c3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Feb 3 20:41:16 2009 +1100 shdocvw: OnAmbientPropertyChange should refresh all properties with a DISPID_UNKNOWN. --- dlls/shdocvw/oleobject.c | 5 +++++ dlls/shdocvw/tests/webbrowser.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 198ff2a..cd5e605 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -718,6 +718,11 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS TRACE("(%p)->(%d)\n", This, dispID); switch(dispID) { + case DISPID_UNKNOWN: + /* Unknown means multiple properties changed, so check them all. */ + on_offlineconnected_change(This); + on_silent_change(This); + return S_OK; case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: return on_offlineconnected_change(This); case DISPID_AMBIENT_SILENT: diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 5b04119..27cd353 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -1773,6 +1773,31 @@ static void test_Offline(IWebBrowser2 *wb, IOleControl *control, BOOL is_clients ok(b == VARIANT_FALSE, "b=%x\n", b); } +static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) +{ + HRESULT hres; + + SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + SET_EXPECT(Invoke_AMBIENT_SILENT); + SET_EXPECT(Invoke_AMBIENT_USERMODE); + SET_EXPECT(Invoke_AMBIENT_DLCONTROL); + SET_EXPECT(Invoke_AMBIENT_USERAGENT); + SET_EXPECT(Invoke_AMBIENT_PALETTE); + + hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN); + ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); + + if(is_clientsite) + { + CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + CHECK_CALLED(Invoke_AMBIENT_SILENT); + todo_wine CHECK_CALLED(Invoke_AMBIENT_USERMODE); + todo_wine CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); + todo_wine CHECK_CALLED(Invoke_AMBIENT_USERAGENT); + todo_wine CHECK_CALLED(Invoke_AMBIENT_PALETTE); + } +} + static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite) { IWebBrowser2 *wb; @@ -1787,6 +1812,7 @@ static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite) test_Silent(wb, control, is_clientsite); test_Offline(wb, control, is_clientsite); + test_ambient_unknown(wb, control, is_clientsite); IWebBrowser_Release(wb); IOleControl_Release(control);
1
0
0
0
Alistair Leslie-Hughes : mshtml: Add support for IHTMLStyle4 interface.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 36a2d5ac3a024d98d7be677309ad6a0befa2074c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36a2d5ac3a024d98d7be67730…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Feb 3 19:42:25 2009 +1100 mshtml: Add support for IHTMLStyle4 interface. --- dlls/mshtml/htmlstyle.c | 3 + dlls/mshtml/htmlstyle.h | 2 + dlls/mshtml/htmlstyle3.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/tests/dom.c | 1 + 4 files changed, 105 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index c05b2b6..ad9d095 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -471,6 +471,9 @@ static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, v }else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) { TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv); *ppv = HTMLSTYLE3(This); + }else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) { + TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv); + *ppv = HTMLSTYLE4(This); }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; } diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index ef00085..a9ff535 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -21,6 +21,7 @@ struct HTMLStyle { const IHTMLStyleVtbl *lpHTMLStyleVtbl; const IHTMLStyle2Vtbl *lpHTMLStyle2Vtbl; const IHTMLStyle3Vtbl *lpHTMLStyle3Vtbl; + const IHTMLStyle4Vtbl *lpHTMLStyle4Vtbl; LONG ref; @@ -30,6 +31,7 @@ struct HTMLStyle { #define HTMLSTYLE(x) ((IHTMLStyle*) &(x)->lpHTMLStyleVtbl) #define HTMLSTYLE2(x) ((IHTMLStyle2*) &(x)->lpHTMLStyle2Vtbl) #define HTMLSTYLE3(x) ((IHTMLStyle3*) &(x)->lpHTMLStyle3Vtbl) +#define HTMLSTYLE4(x) ((IHTMLStyle4*) &(x)->lpHTMLStyle4Vtbl) /* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */ typedef enum { diff --git a/dlls/mshtml/htmlstyle3.c b/dlls/mshtml/htmlstyle3.c index 9b9451a..f5ed8b5 100644 --- a/dlls/mshtml/htmlstyle3.c +++ b/dlls/mshtml/htmlstyle3.c @@ -336,7 +336,106 @@ static const IHTMLStyle3Vtbl HTMLStyle3Vtbl = { HTMLStyle3_get_textKashidaSpace }; +/* + * IHTMLStyle4 Interface + */ +#define HTMLSTYLE4_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle4, iface) + +static HRESULT WINAPI HTMLStyle4_QueryInterface(IHTMLStyle4 *iface, REFIID riid, void **ppv) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + + return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv); +} + +static ULONG WINAPI HTMLStyle4_AddRef(IHTMLStyle4 *iface) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + + return IHTMLStyle_AddRef(HTMLSTYLE(This)); +} + +static ULONG WINAPI HTMLStyle4_Release(IHTMLStyle4 *iface) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + + return IHTMLStyle_Release(HTMLSTYLE(This)); +} + +static HRESULT WINAPI HTMLStyle4_GetTypeInfoCount(IHTMLStyle4 *iface, UINT *pctinfo) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo); +} + +static HRESULT WINAPI HTMLStyle4_GetTypeInfo(IHTMLStyle4 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo); +} + +static HRESULT WINAPI HTMLStyle4_GetIDsOfNames(IHTMLStyle4 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId); +} + +static HRESULT WINAPI HTMLStyle4_Invoke(IHTMLStyle4 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid, + wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); +} + +static HRESULT WINAPI HTMLStyle4_put_textOverflow(IHTMLStyle4 *iface, BSTR v) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyle4_put_minHeight(IHTMLStyle4 *iface, VARIANT v) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyle4_get_minHeight(IHTMLStyle4 *iface, VARIANT *p) +{ + HTMLStyle *This = HTMLSTYLE4_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static const IHTMLStyle4Vtbl HTMLStyle4Vtbl = { + HTMLStyle4_QueryInterface, + HTMLStyle4_AddRef, + HTMLStyle4_Release, + HTMLStyle4_GetTypeInfoCount, + HTMLStyle4_GetTypeInfo, + HTMLStyle4_GetIDsOfNames, + HTMLStyle4_Invoke, + HTMLStyle4_put_textOverflow, + HTMLStyle4_get_textOverflow, + HTMLStyle4_put_minHeight, + HTMLStyle4_get_minHeight +}; + void HTMLStyle3_Init(HTMLStyle *This) { This->lpHTMLStyle3Vtbl = &HTMLStyle3Vtbl; + This->lpHTMLStyle4Vtbl = &HTMLStyle4Vtbl; } diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 4882ee7..62a07bc 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -308,6 +308,7 @@ static const IID * const style_iids[] = { &IID_IHTMLStyle, &IID_IHTMLStyle2, &IID_IHTMLStyle3, + &IID_IHTMLStyle4, NULL };
1
0
0
0
Alistair Leslie-Hughes : mshtml: Add support for IHTMLStyle3 interface.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 337c066314f1e763ca7f51657acaa3bffda6fc22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=337c066314f1e763ca7f51657…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Feb 3 19:21:32 2009 +1100 mshtml: Add support for IHTMLStyle3 interface. --- dlls/mshtml/Makefile.in | 1 + dlls/mshtml/htmlstyle.c | 4 + dlls/mshtml/htmlstyle.h | 3 + dlls/mshtml/htmlstyle3.c | 342 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/tests/dom.c | 1 + 5 files changed, 351 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=337c066314f1e763ca7f5…
1
0
0
0
David Adam : d3dx9_36: Implement D3DXIntersectTri.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 8716c62c6eb2f2405b2d8ba7561f2727027a4ce1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8716c62c6eb2f2405b2d8ba75…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Tue Feb 3 09:36:08 2009 +0100 d3dx9_36: Implement D3DXIntersectTri. --- dlls/d3dx9_36/Makefile.in | 1 + dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 72 +++++++++++++++++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/d3dx9mesh.h | 38 ++++++++++++++++++++++ 5 files changed, 113 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in index 0b5a3d3..7cd5c3c 100644 --- a/dlls/d3dx9_36/Makefile.in +++ b/dlls/d3dx9_36/Makefile.in @@ -10,6 +10,7 @@ C_SRCS = \ d3dx9_36_main.c \ font.c \ math.c \ + mesh.c \ shader.c \ sprite.c diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index ab198ab..813a5ad 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -167,7 +167,7 @@ @ stdcall D3DXGetVertexShaderProfile(ptr) @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectSubset -@ stub D3DXIntersectTri +@ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) @ stub D3DXLoadMeshFromXA @ stub D3DXLoadMeshFromXInMemory @ stub D3DXLoadMeshFromXResource diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c new file mode 100644 index 0000000..0ecace6 --- /dev/null +++ b/dlls/d3dx9_36/mesh.c @@ -0,0 +1,72 @@ + /* + * Mesh operations specific to D3DX9. + * + * Copyright (C) 2009 David Adam + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "windef.h" +#include "wingdi.h" +#include "wine/debug.h" +#include "d3dx9.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +/************************************************************************* + * D3DXIntersectTri + */ +BOOL WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *p0, CONST D3DXVECTOR3 *p1, CONST D3DXVECTOR3 *p2, CONST D3DXVECTOR3 *praypos, CONST D3DXVECTOR3 *praydir, FLOAT *pu, FLOAT *pv, FLOAT *pdist) +{ + D3DXMATRIX m; + D3DXVECTOR4 vec; + + m.m[0][0] = p1->x - p0->x; + m.m[1][0] = p2->x - p0->x; + m.m[2][0] = -praydir->x; + m.m[3][0] = 0.0f; + m.m[0][1] = p1->y - p0->z; + m.m[1][1] = p2->y - p0->z; + m.m[2][1] = -praydir->y; + m.m[3][1] = 0.0f; + m.m[0][2] = p1->z - p0->z; + m.m[1][2] = p2->z - p0->z; + m.m[2][2] = -praydir->z; + m.m[3][2] = 0.0f; + m.m[0][3] = 0.0f; + m.m[1][3] = 0.0f; + m.m[2][3] = 0.0f; + m.m[3][3] = 1.0f; + + vec.x = praypos->x - p0->x; + vec.y = praypos->y - p0->y; + vec.z = praypos->z - p0->z; + vec.w = 0.0f; + + if ( D3DXMatrixInverse(&m, NULL, &m) ) + { + D3DXVec4Transform(&vec, &vec, &m); + if ( (vec.x >= 0.0f) && (vec.y >= 0.0f) && (vec.x + vec.y <= 1.0f) && (vec.z >= 0.0f) ) + { + *pu = vec.x; + *pv = vec.y; + *pdist = fabs( vec.z ); + return TRUE; + } + } + + return FALSE; +} diff --git a/include/Makefile.in b/include/Makefile.in index 23be56b..5411cc0 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -144,6 +144,7 @@ SRCDIR_INCLUDES = \ d3dx9core.h \ d3dx9math.h \ d3dx9math.inl \ + d3dx9mesh.h \ d3dx9shader.h \ d3dx9tex.h \ dbghelp.h \ diff --git a/include/d3dx9mesh.h b/include/d3dx9mesh.h new file mode 100644 index 0000000..c337ad2 --- /dev/null +++ b/include/d3dx9mesh.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 David Adam + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_D3DX9MESH_H +#define __WINE_D3DX9MESH_H + +#include <d3dx9.h> + +#ifdef __cplusplus +extern "C" { +#endif + +HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*); +UINT WINAPI D3DXGetFVFVertexSize(DWORD); +BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *); +BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *); +BOOL WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *); + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_D3DX9MESH_H */
1
0
0
0
David Adam : d3dx8: Implement D3DXIntersectTri.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: b8eb4cf861b9b0825de7d9f5a15e38c01e5ba2fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8eb4cf861b9b0825de7d9f5a…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Tue Feb 3 09:41:12 2009 +0100 d3dx8: Implement D3DXIntersectTri. --- dlls/d3dx8/d3dx8.spec | 1 + dlls/d3dx8/mesh.c | 42 +++++++++++++++++++++++++++++ dlls/d3dx8/tests/mesh.c | 61 +++++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/d3dx9_36.spec | 2 +- include/d3dx8mesh.h | 1 + 5 files changed, 106 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx8/d3dx8.spec b/dlls/d3dx8/d3dx8.spec index 036a510..3ee6f1b 100644 --- a/dlls/d3dx8/d3dx8.spec +++ b/dlls/d3dx8/d3dx8.spec @@ -109,6 +109,7 @@ @ stub D3DXFVFFromDeclarator @ stub D3DXWeldVertices @ stub D3DXIntersect +@ cdecl D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) @ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) @ stub D3DXCreatePolygon diff --git a/dlls/d3dx8/mesh.c b/dlls/d3dx8/mesh.c index c1d242b..88e9b87 100644 --- a/dlls/d3dx8/mesh.c +++ b/dlls/d3dx8/mesh.c @@ -90,6 +90,48 @@ done we've got an intersection of the ray with the box. return TRUE; } +BOOL CDECL D3DXIntersectTri(CONST D3DXVECTOR3 *p0, CONST D3DXVECTOR3 *p1, CONST D3DXVECTOR3 *p2, CONST D3DXVECTOR3 *praypos, CONST D3DXVECTOR3 *praydir, FLOAT *pu, FLOAT *pv, FLOAT *pdist) +{ + D3DXMATRIX m; + D3DXVECTOR4 vec; + + m.m[0][0] = p1->x - p0->x; + m.m[1][0] = p2->x - p0->x; + m.m[2][0] = -praydir->x; + m.m[3][0] = 0.0f; + m.m[0][1] = p1->y - p0->z; + m.m[1][1] = p2->y - p0->z; + m.m[2][1] = -praydir->y; + m.m[3][1] = 0.0f; + m.m[0][2] = p1->z - p0->z; + m.m[1][2] = p2->z - p0->z; + m.m[2][2] = -praydir->z; + m.m[3][2] = 0.0f; + m.m[0][3] = 0.0f; + m.m[1][3] = 0.0f; + m.m[2][3] = 0.0f; + m.m[3][3] = 1.0f; + + vec.x = praypos->x - p0->x; + vec.y = praypos->y - p0->y; + vec.z = praypos->z - p0->z; + vec.w = 0.0f; + + if ( D3DXMatrixInverse(&m, NULL, &m) ) + { + D3DXVec4Transform(&vec, &vec, &m); + if ( (vec.x >= 0.0f) && (vec.y >= 0.0f) && (vec.x + vec.y <= 1.0f) && (vec.z >= 0.0f) ) + { + *pu = vec.x; + *pv = vec.y; + *pdist = fabs( vec.z ); + return TRUE; + } + } + +return FALSE; +} + BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pcenter, FLOAT radius, CONST D3DXVECTOR3 *prayposition, CONST D3DXVECTOR3 *praydirection) { D3DXVECTOR3 difference; diff --git a/dlls/d3dx8/tests/mesh.c b/dlls/d3dx8/tests/mesh.c index e3370de..967f3c9 100644 --- a/dlls/d3dx8/tests/mesh.c +++ b/dlls/d3dx8/tests/mesh.c @@ -20,6 +20,13 @@ #include "wine/test.h" +#define admitted_error 0.0001f + +BOOL compare(FLOAT u, FLOAT v) +{ + return (fabs(u-v) < admitted_error); +} + static void D3DXBoundProbeTest(void) { BOOL result; @@ -94,7 +101,61 @@ static void D3DXBoundProbeTest(void) ok(result == FALSE, "expected FALSE, received TRUE\n"); } +static void D3DXIntersectTriTest(void) +{ + BOOL exp_res, got_res; + D3DXVECTOR3 position, ray, vertex[3]; + FLOAT exp_dist, got_dist, exp_u, got_u, exp_v, got_v; + + vertex[0].x = 1.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f; + vertex[1].x = 2.0f; vertex[1].y = 0.0f; vertex[1].z = 0.0f; + vertex[2].x = 1.0f; vertex[2].y = 1.0f; vertex[2].z = 0.0f; + + position.x = -14.5f; position.y = -23.75f; position.z = -32.0f; + + ray.x = 2.0f; ray.y = 3.0f; ray.z = 4.0f; + + exp_res = TRUE; exp_u = 0.5f; exp_v = 0.25f; exp_dist = 8.0f; + + got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist); + ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res); + ok( compare(exp_u,got_u), "Expected u = %f, got %f\n",exp_u,got_u); + ok( compare(exp_v,got_v), "Expected v = %f, got %f\n",exp_v,got_v); + ok( compare(exp_dist,got_dist), "Expected distance = %f, got %f\n",exp_dist,got_dist); + +/*Only positive ray is taken in account*/ + + vertex[0].x = 1.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f; + vertex[1].x = 2.0f; vertex[1].y = 0.0f; vertex[1].z = 0.0f; + vertex[2].x = 1.0f; vertex[2].y = 1.0f; vertex[2].z = 0.0f; + + position.x = 17.5f; position.y = 24.25f; position.z = 32.0f; + + ray.x = 2.0f; ray.y = 3.0f; ray.z = 4.0f; + + exp_res = FALSE; + + got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist); + ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res); + +/*Intersection between ray and triangle in a same plane is considered as empty*/ + + vertex[0].x = 4.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f; + vertex[1].x = 6.0f; vertex[1].y = 0.0f; vertex[1].z = 0.0f; + vertex[2].x = 4.0f; vertex[2].y = 2.0f; vertex[2].z = 0.0f; + + position.x = 1.0f; position.y = 1.0f; position.z = 0.0f; + + ray.x = 1.0f; ray.y = 0.0f; ray.z = 0.0f; + + exp_res = FALSE; + + got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist); + ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res); +} + START_TEST(mesh) { D3DXBoundProbeTest(); + D3DXIntersectTriTest(); } diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index d7fba36..ab198ab 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -167,7 +167,7 @@ @ stdcall D3DXGetVertexShaderProfile(ptr) @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectSubset -@ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectTri +@ stub D3DXIntersectTri @ stub D3DXLoadMeshFromXA @ stub D3DXLoadMeshFromXInMemory @ stub D3DXLoadMeshFromXResource diff --git a/include/d3dx8mesh.h b/include/d3dx8mesh.h index 0d399ea..8cdb166 100644 --- a/include/d3dx8mesh.h +++ b/include/d3dx8mesh.h @@ -30,6 +30,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD,LPD3DXBUFFER*); UINT WINAPI D3DXGetFVFVertexSize(DWORD); BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *); BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *); +BOOL CDECL D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, FLOAT *, FLOAT *, FLOAT *); #ifdef __cplusplus }
1
0
0
0
Jeremy White : sane.ds: Pass MSG_QUERYSUPPORT requests to the capability driver.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 5bef45201aa0ff591b3efb3441f37c622878ec61 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bef45201aa0ff591b3efb344…
Author: Jeremy White <jwhite(a)winehq.org> Date: Mon Feb 2 16:12:55 2009 -0600 sane.ds: Pass MSG_QUERYSUPPORT requests to the capability driver. --- dlls/sane.ds/ds_ctrl.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/sane.ds/ds_ctrl.c b/dlls/sane.ds/ds_ctrl.c index dbd3f3e..2c8d312 100644 --- a/dlls/sane.ds/ds_ctrl.c +++ b/dlls/sane.ds/ds_ctrl.c @@ -101,9 +101,24 @@ TW_UINT16 SANE_CapabilityGetDefault (pTW_IDENTITY pOrigin, TW_MEMREF pData) TW_UINT16 SANE_CapabilityQuerySupport (pTW_IDENTITY pOrigin, TW_MEMREF pData) { - FIXME ("stub!\n"); + TW_UINT16 twRC = TWRC_SUCCESS, twCC = TWCC_SUCCESS; + pTW_CAPABILITY pCapability = (pTW_CAPABILITY) pData; - return TWRC_FAILURE; + TRACE("DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT\n"); + + if (activeDS.currentState < 4 || activeDS.currentState > 7) + { + twRC = TWRC_FAILURE; + activeDS.twCC = TWCC_SEQERROR; + } + else + { + twCC = SANE_SaneCapability (pCapability, MSG_QUERYSUPPORT); + twRC = (twCC == TWCC_SUCCESS)?TWRC_SUCCESS:TWRC_FAILURE; + activeDS.twCC = twCC; + } + + return twRC; } /* DG_CONTROL/DAT_CAPABILITY/MSG_RESET */
1
0
0
0
Jeremy White : twain_32: Add the ability to thoroughly test basic capability types, and add that test for the one capability Wine supports, ICAP_XFERMECH.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: 1199c30c9c4b45200cd198ee22fc8d158c388482 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1199c30c9c4b45200cd198ee2…
Author: Jeremy White <jwhite(a)winehq.org> Date: Mon Feb 2 16:12:44 2009 -0600 twain_32: Add the ability to thoroughly test basic capability types, and add that test for the one capability Wine supports, ICAP_XFERMECH. --- dlls/twain_32/tests/dsm.c | 211 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 211 insertions(+), 0 deletions(-) diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c index 278ea7c..cf9acef 100644 --- a/dlls/twain_32/tests/dsm.c +++ b/dlls/twain_32/tests/dsm.c @@ -57,6 +57,214 @@ static void get_condition_code(TW_IDENTITY *appid, TW_IDENTITY *source, TW_STATU ok(rc == TWRC_SUCCESS, "Condition code not available, rc %d\n", rc); } +static BOOL get_onevalue(TW_HANDLE hcontainer, TW_UINT32 *ret, TW_UINT16 *type) +{ + TW_ONEVALUE *onev; + onev = GlobalLock(hcontainer); + if (onev) + { + *ret = onev->Item; + if (type) + *type = onev->ItemType; + GlobalUnlock(hcontainer); + return TRUE; + } + return FALSE; +} + +static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type) +{ + TW_HANDLE hcontainer; + TW_ONEVALUE *onev; + hcontainer = GlobalAlloc(0, sizeof(*onev)); + if (hcontainer) + { + onev = GlobalLock(hcontainer); + if (onev) + { + onev->ItemType = type; + onev->Item = val; + GlobalUnlock(hcontainer); + } + else + hcontainer = 0; + } + return hcontainer; +} + +static void check_get(TW_CAPABILITY *pCapability, + TW_UINT32 orig_value, TW_UINT32 default_value, TW_UINT32 *suggested_set_value) +{ + void *p; + if (suggested_set_value) + *suggested_set_value = orig_value + 1; + p = GlobalLock(pCapability->hContainer); + if (p) + { + if (pCapability->ConType == TWON_ONEVALUE) + { + TW_ONEVALUE *onev = (TW_ONEVALUE *) p; + ok(onev->Item == orig_value, "MSG_GET of 0x%x returned 0x%x, expecting 0x%x\n", + pCapability->Cap, onev->Item, orig_value); + } + else if (pCapability->ConType == TWON_ENUMERATION) + { + int i; + TW_UINT8 *p8; + TW_UINT16 *p16; + TW_UINT32 *p32; + TW_ENUMERATION *enumv = (TW_ENUMERATION *) p; + p8 = enumv->ItemList; + p16 = (TW_UINT16 *) p8; + p32 = (TW_UINT32 *) p8; + trace("MSG_GET of 0x%x returned %d items:\n", pCapability->Cap, enumv->NumItems); + for (i = 0; i < enumv->NumItems; i++) + { + if (enumv->ItemType == TWTY_UINT8 || enumv->ItemType == TWTY_INT8) + trace(" %d: 0x%x\n", i, p8[i]); + if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) + trace(" %d: 0x%x\n", i, p16[i]); + if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) + trace(" %d: 0x%x\n", i, p32[i]); + } + if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) + { + ok(p16[enumv->CurrentIndex] == orig_value, + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", + pCapability->Cap, p16[enumv->CurrentIndex], orig_value); + ok(p16[enumv->DefaultIndex] == default_value, + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", + pCapability->Cap, p16[enumv->DefaultIndex], default_value); + if (suggested_set_value) + *suggested_set_value = p16[(enumv->CurrentIndex + 1) % enumv->NumItems]; + } + if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) + { + ok(p32[enumv->CurrentIndex] == orig_value, + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", + pCapability->Cap, p32[enumv->CurrentIndex], orig_value); + ok(p32[enumv->DefaultIndex] == default_value, + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", + pCapability->Cap, p32[enumv->DefaultIndex], default_value); + if (suggested_set_value) + *suggested_set_value = p32[(enumv->CurrentIndex + 1) % enumv->NumItems]; + } + } + else + trace("MSG_GET on type 0x%x returned type 0x%x, which we didn't check.\n", pCapability->Cap, pCapability->ConType); + GlobalUnlock(pCapability->hContainer); + } +} + +static void test_onevalue_cap(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 captype, TW_UINT16 type, TW_INT32 expected_support) +{ + TW_UINT16 rc; + TW_UINT16 rtype; + TW_STATUS status; + TW_CAPABILITY cap; + TW_UINT32 orig_value = 0; + TW_UINT32 new_value; + TW_UINT32 default_value = 0; + TW_INT32 actual_support; + + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_DONTCARE16; + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_QUERYSUPPORT, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_QUERYSUPPORT for type 0x%x\n", rc, status.ConditionCode, captype); + if (rc != TWRC_SUCCESS) + return; + ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x", captype); + ok(actual_support == expected_support, + "Error: expected support 0x%x for type 0x%x, got 0x%x\n", expected_support, + captype, actual_support); + + + if (actual_support & TWQC_GETCURRENT) + { + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_DONTCARE16; + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_GETCURRENT for type 0x%x\n", rc, status.ConditionCode, captype); + if (rc == TWRC_SUCCESS) + { + ok(get_onevalue(cap.hContainer, &orig_value, &rtype), "Returned cap.hContainer invalid for GETCURRENT on type 0x%x", captype); + ok(rtype == type, "Returned GETCURRENT type 0x%x for cap 0x%x is not expected 0x%x\n", rtype, captype, type); + GlobalFree(cap.hContainer); + } + } + + if (actual_support & TWQC_GETDEFAULT) + { + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_DONTCARE16; + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETDEFAULT, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_GETDEFAULT for type 0x%x\n", rc, status.ConditionCode, captype); + if (rc == TWRC_SUCCESS) + { + ok(get_onevalue(cap.hContainer, &default_value, &rtype), "Returned cap.hContainer invalid for GETDEFAULT on type 0x%x", captype); + ok(rtype == type, "Returned GETDEFAULT type 0x%x for cap 0x%x is not expected 0x%x\n", rtype, captype, type); + GlobalFree(cap.hContainer); + } + } + + new_value = orig_value; + if (actual_support & TWQC_GET) + { + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_DONTCARE16; + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_GET for type 0x%x\n", rc, status.ConditionCode, captype); + check_get(&cap, orig_value, default_value, &new_value); + if (rc == TWRC_SUCCESS) + GlobalFree(cap.hContainer); + } + + if (actual_support & TWQC_SET) + { + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_ONEVALUE; + cap.hContainer = alloc_and_set_onevalue(new_value, type); + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_SET, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_SET for type 0x%x\n", rc, status.ConditionCode, captype); + GlobalFree(cap.hContainer); + } + + if (actual_support & TWQC_RESET) + { + memset(&cap, 0, sizeof(cap)); + cap.Cap = captype; + cap.ConType = TWON_DONTCARE16; + + rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_RESET, &cap); + get_condition_code(appid, source, &status); + ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, + "Error [rc %d|cc %d] doing MSG_RESET for type 0x%x\n", rc, status.ConditionCode, captype); + if (rc == TWRC_SUCCESS) + GlobalFree(cap.hContainer); + } +} + + static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) { TW_UINT16 rc; @@ -133,6 +341,9 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) todo_wine ok(capabilities[ICAP_UNITS], "ICAP_UNITS not supported\n"); ok(capabilities[ICAP_XFERMECH], "ICAP_XFERMECH not supported\n"); + if (capabilities[ICAP_XFERMECH]) + test_onevalue_cap(appid, source, ICAP_XFERMECH, TWTY_UINT16, + TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); todo_wine ok(capabilities[ICAP_XRESOLUTION], "ICAP_XRESOLUTION not supported\n"); todo_wine
1
0
0
0
Paul TBBle Hampson : winefile: Don't use child after it has been freed.
by Alexandre Julliard
03 Feb '09
03 Feb '09
Module: wine Branch: master Commit: c09f1357bccbdf25ab7b46d508c27fad5801bac4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c09f1357bccbdf25ab7b46d50…
Author: Paul TBBle Hampson <Paul.Hampson(a)Pobox.com> Date: Tue Feb 3 09:39:32 2009 +1100 winefile: Don't use child after it has been freed. If winefile is unable to create a window, it frees the child pointer. However, it then proceeds to use the child pointer. --- programs/winefile/winefile.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index aefe7bd..0193c7b 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -4706,7 +4706,7 @@ static void InitInstance(HINSTANCE hinstance) } -static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) +static BOOL show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) { static const TCHAR sMDICLIENT[] = {'M','D','I','C','L','I','E','N','T','\0'}; @@ -4718,7 +4718,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) CLIENTCREATESTRUCT ccs; if (Globals.hMainWnd) - return; + return TRUE; opts = load_registry_settings(); hMenuFrame = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(IDM_WINEFILE)); @@ -4796,8 +4796,10 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) child->pos.rcNormalPosition.right = 320; child->pos.rcNormalPosition.bottom = 280; - if (!create_child_window(child)) + if (!create_child_window(child)) { HeapFree(GetProcessHeap(), 0, child); + return FALSE; + } SetWindowPlacement(child->hwnd, &child->pos); @@ -4807,7 +4809,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) UpdateWindow(Globals.hMainWnd); - if (path && path[0]) + if (child->hwnd && path && path[0]) { int index,count; TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT]; @@ -4835,6 +4837,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path) } } } + return TRUE; } static void ExitInstance(void) @@ -4888,7 +4891,11 @@ static int winefile_main(HINSTANCE hinstance, int cmdshow, LPCTSTR path) InitInstance(hinstance); - show_frame(0, cmdshow, path); + if( !show_frame(0, cmdshow, path) ) + { + ExitInstance(); + return 1; + } while(GetMessage(&msg, 0, 0, 0)) { if (Globals.hmdiclient && TranslateMDISysAccel(Globals.hmdiclient, &msg))
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
...
97
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
Results per page:
10
25
50
100
200