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
August 2016
----- 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
777 discussions
Start a n
N
ew thread
Martin Storsjo : msvcp140: Add MSVC 2015 C++ support DLL.
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: 1135db7095bf7d46801492b30dc5ecf8455e1b06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1135db7095bf7d46801492b30…
Author: Martin Storsjo <martin(a)martin.st> Date: Tue Nov 3 23:54:34 2015 +0200 msvcp140: Add MSVC 2015 C++ support DLL. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 4 +- configure.ac | 3 +- dlls/msvcp140/Makefile.in | 14 + dlls/msvcp140/msvcp140.spec | 3783 +++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/ios.c | 10 + dlls/msvcp90/msvcp90.h | 8 + dlls/msvcp90/msvcp_main.c | 54 + dlls/ucrtbase/Makefile.in | 1 + tools/make_specfiles | 1 + 9 files changed, 3876 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1135db7095bf7d4680149…
1
0
0
0
Nikolay Sivov : ucrtbase: Added __stdio_common_vswprintf_p().
by Alexandre Julliard
03 Aug '16
03 Aug '16
Module: wine Branch: master Commit: ff49f86fa14e4fee3e2d959354f26cbe33dd9d4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff49f86fa14e4fee3e2d95935…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Aug 3 07:23:09 2016 +0300 ucrtbase: Added __stdio_common_vswprintf_p(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-stdio-l1-1-0.spec | 2 +- dlls/msvcrt/wcs.c | 40 ++++++++++++++++------ dlls/ucrtbase/ucrtbase.spec | 2 +- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec index 10a2ab7..d52c0d4 100644 --- a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec +++ b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec @@ -16,7 +16,7 @@ @ cdecl __stdio_common_vsprintf_s(int64 ptr long str ptr ptr) ucrtbase.__stdio_common_vsprintf_s @ cdecl __stdio_common_vsscanf(int64 ptr long str ptr ptr) ucrtbase.__stdio_common_vsscanf @ cdecl __stdio_common_vswprintf(int64 ptr long wstr ptr ptr) ucrtbase.__stdio_common_vswprintf -@ stub __stdio_common_vswprintf_p +@ cdecl __stdio_common_vswprintf_p(int64 ptr long wstr ptr ptr) ucrtbase.__stdio_common_vswprintf_p @ cdecl __stdio_common_vswprintf_s(int64 ptr long wstr ptr ptr) ucrtbase.__stdio_common_vswprintf_s @ stub __stdio_common_vswscanf @ cdecl _chsize(long long) ucrtbase._chsize diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 6fc642c..c497a10 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1112,11 +1112,8 @@ int CDECL MSVCRT_vsnwprintf_l(MSVCRT_wchar_t *str, MSVCRT_size_t len, return ret; } -/********************************************************************* - * _vswprintf_p_l (MSVCRT.@) - */ -int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, - const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args) +static int MSVCRT_vswprintf_p_l_opt(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, + const MSVCRT_wchar_t *format, DWORD options, MSVCRT__locale_t locale, __ms_va_list args) { static const MSVCRT_wchar_t nullbyte = '\0'; printf_arg args_ctx[MSVCRT__ARGMAX+1]; @@ -1131,11 +1128,11 @@ int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, *MSVCRT__errno() = MSVCRT_EINVAL; return ret; } else if(ret == 0) - ret = pf_printf_w(puts_clbk_str_w, &puts_ctx, format, locale, MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, + ret = pf_printf_w(puts_clbk_str_w, &puts_ctx, format, locale, MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER | options, arg_clbk_valist, NULL, &args); else ret = pf_printf_w(puts_clbk_str_w, &puts_ctx, format, locale, - MSVCRT_PRINTF_POSITIONAL_PARAMS | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, + MSVCRT_PRINTF_POSITIONAL_PARAMS | MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER | options, arg_clbk_positional, args_ctx, NULL); puts_clbk_str_w(&puts_ctx, 1, &nullbyte); @@ -1143,16 +1140,37 @@ int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, } /********************************************************************* + * _vswprintf_p_l (MSVCRT.@) + */ +int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, + const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args) +{ + return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, locale, args); +} + +/********************************************************************* * _vswprintf_p (MSVCR100.@) */ int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, const MSVCRT_wchar_t *format, __ms_va_list args) { - return MSVCRT_vswprintf_p_l(buffer, length, format, NULL, args); + return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, NULL, args); } /********************************************************************* + * __stdio_common_vswprintf_p (MSVCRT.@) + */ +int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options, + MSVCRT_wchar_t *str, MSVCRT_size_t count, const MSVCRT_wchar_t *format, + MSVCRT__locale_t locale, __ms_va_list valist ) +{ + if (options & ~UCRTBASE_PRINTF_MASK) + FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); + return MSVCRT_vswprintf_p_l_opt(str, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); +} + +/********************************************************************* * _vsnwprintf_s_l (MSVCRT.@) */ int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, @@ -1399,7 +1417,7 @@ int CDECL MSVCRT__vscwprintf_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t l */ int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list args ) { - return MSVCRT_vswprintf_p_l( NULL, INT_MAX, format, locale, args ); + return MSVCRT_vswprintf_p_l_opt( NULL, INT_MAX, format, 0, locale, args ); } /********************************************************************* @@ -1407,7 +1425,7 @@ int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t */ int CDECL MSVCRT__vscwprintf_p(const MSVCRT_wchar_t *format, __ms_va_list args) { - return MSVCRT_vswprintf_p_l(NULL, INT_MAX, format, NULL, args); + return MSVCRT_vswprintf_p_l_opt(NULL, INT_MAX, format, 0, NULL, args); } /********************************************************************* @@ -1523,7 +1541,7 @@ int CDECL MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, int r; __ms_va_start(valist, locale); - r = MSVCRT_vswprintf_p_l(buffer, length, format, locale, valist); + r = MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, locale, valist); __ms_va_end(valist); return r; diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index f77cbe3..95fcc05 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -161,7 +161,7 @@ @ cdecl __stdio_common_vsprintf_s(int64 ptr long str ptr ptr) MSVCRT__stdio_common_vsprintf_s @ cdecl __stdio_common_vsscanf(int64 ptr long str ptr ptr) MSVCRT__stdio_common_vsscanf @ cdecl __stdio_common_vswprintf(int64 ptr long wstr ptr ptr) MSVCRT__stdio_common_vswprintf -@ stub __stdio_common_vswprintf_p +@ cdecl __stdio_common_vswprintf_p(int64 ptr long wstr ptr ptr) MSVCRT__stdio_common_vswprintf_p @ cdecl __stdio_common_vswprintf_s(int64 ptr long wstr ptr ptr) MSVCRT__stdio_common_vswprintf_s @ stub __stdio_common_vswscanf @ stub __strncnt
1
0
0
0
Nikolay Sivov : comctl32/tests: Test that callback mask is stored as is, check more message results.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: 9ef65cf3d6af2e488d7efcb94fe61aa7e8540351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ef65cf3d6af2e488d7efcb94…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Aug 2 21:03:47 2016 +0300 comctl32/tests: Test that callback mask is stored as is, check more message results. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/listview.c | 73 +++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 97f611f..811800c 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1179,7 +1179,8 @@ static void test_items(void) r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); ok(item.state & LVIS_SELECTED, "Expected LVIS_SELECTED\n"); - SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + ok(r, "got %d\n", r); /* LVIS_SELECTED with zero stateMask */ /* set */ @@ -1201,7 +1202,8 @@ static void test_items(void) r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); ok(item.state & LVIS_FOCUSED, "Expected LVIS_FOCUSED\n"); - SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + ok(r, "got %d\n", r); /* LVIS_CUT with LVIS_FOCUSED stateMask */ /* set */ @@ -1223,7 +1225,8 @@ static void test_items(void) r = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); expect(1, r); ok(item.state & LVIS_CUT, "Expected LVIS_CUT\n"); - SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + r = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + ok(r, "got %d\n", r); /* Insert an item with just a param */ memset (&item, 0xcc, sizeof (item)); @@ -2294,15 +2297,18 @@ static void test_multiselect(void) /* deselect all items */ item.state = 0; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + ok(r, "got %d\n", r); SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); /* set initial position */ - SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, (task.initPos == -1 ? item_count -1 : task.initPos)); + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, (task.initPos == -1 ? item_count -1 : task.initPos)); + ok(r, "got %d\n", r); item.state = LVIS_SELECTED; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, task.initPos == -1 ? item_count-1 : task.initPos, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, task.initPos == -1 ? item_count-1 : task.initPos, (LPARAM)&item); + ok(r, "got %d\n", r); selected_count = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); ok(selected_count == 1, "expected 1, got %d\n", selected_count); @@ -2347,7 +2353,8 @@ static void test_multiselect(void) /* select all, check notifications */ item.state = 0; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + ok(r, "got %d\n", r); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -2381,7 +2388,8 @@ static void test_multiselect(void) item.state = 0; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + ok(r, "got %d\n", r); ok_sequence(sequences, PARENT_SEQ_INDEX, change_all_parent_seq, "deselect all notification", FALSE); @@ -2410,11 +2418,13 @@ static void test_multiselect(void) ok_sequence(sequences, PARENT_SEQ_INDEX, changing_all_parent_seq, "set state all notification 3", FALSE); - SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); + ok(r, "got %d\n", r); for (i = 0; i < 3; i++) { item.state = LVIS_SELECTED; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, i, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, i, (LPARAM)&item); + ok(r, "got %d\n", r); } r = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); @@ -2435,13 +2445,14 @@ static void test_multiselect(void) } r = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); expect(3, r); - SendMessageA(hwnd, LVM_GETSELECTIONMARK, 0, 0); - expect(3, r); + r = SendMessageA(hwnd, LVM_GETSELECTIONMARK, 0, 0); + ok(r == -1, "got %d\n", r); /* select one more */ item.state = LVIS_SELECTED; item.stateMask = LVIS_SELECTED; - SendMessageA(hwnd, LVM_SETITEMSTATE, 3, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_SETITEMSTATE, 3, (LPARAM)&item); + ok(r, "got %d\n", r); for (i=0;i<3;i++) { r = SendMessageA(hwnd, LVM_GETITEMSTATE, i, LVIS_SELECTED); @@ -2461,7 +2472,8 @@ static void test_multiselect(void) item.stateMask = LVIS_SELECTED; r = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); expect(TRUE, r); - SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); + ok(r == -1, "got %d\n", r); item.stateMask = LVIS_SELECTED; item.state = LVIS_SELECTED; @@ -2681,7 +2693,8 @@ static void test_subitem_rect(void) expect(100, rect.left); expect(250, rect.right); - SendMessageA(hwnd, LVM_SCROLL, 10, 0); + r = SendMessageA(hwnd, LVM_SCROLL, 10, 0); + ok(r, "got %d\n", r); SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); @@ -3798,7 +3811,8 @@ static void test_getviewrect(void) memset(&item, 0, sizeof(item)); item.iItem = 0; item.iSubItem = 0; - SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); + r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); + ok(!r, "got %d\n", r); r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); expect(TRUE, r); @@ -3860,7 +3874,8 @@ static void test_getitemposition(void) ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq2, "get item position 2", TRUE); SetRectEmpty(&rect); - SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect); + r = SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect); + ok(r, "got %d\n", r); /* some padding? */ expect(2, pt.x); /* offset by header height */ @@ -4859,7 +4874,8 @@ static void test_getcolumnwidth(void) /* default column width with item added */ hwnd = create_listview_control(LVS_LIST); memset(&itema, 0, sizeof(itema)); - SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema); + ret = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema); + ok(!ret, "got %d\n", ret); ret = SendMessageA(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); height = get_current_font_height(hwnd); ok((ret / height) >= 6, "got width %d, height %d\n", ret, height); @@ -5798,6 +5814,26 @@ static void test_oneclickactivate(void) DestroyWindow(hwnd); } +static void test_callback_mask(void) +{ + DWORD mask; + HWND hwnd; + BOOL ret; + + hwnd = create_listview_control(LVS_REPORT); + + ret = SendMessageA(hwnd, LVM_SETCALLBACKMASK, ~0u, 0); + ok(ret, "got %d\n", ret); + + ret = SendMessageA(hwnd, LVM_SETCALLBACKMASK, ~0u, 1); + ok(ret, "got %d\n", ret); + + mask = SendMessageA(hwnd, LVM_GETCALLBACKMASK, 0, 0); + ok(mask == ~0u, "got 0x%08x\n", mask); + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -5868,6 +5904,7 @@ START_TEST(listview) test_insertitem(); test_header_proc(); test_oneclickactivate(); + test_callback_mask(); if (!load_v6_module(&ctx_cookie, &hCtx)) {
1
0
0
0
Michael Stefaniuc : uxtheme: Use straight assignments instead of CopyRect( ).
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: 74a03b1adc0fe080225b6b491c1d18f62f61f566 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74a03b1adc0fe080225b6b491…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 2 19:11:09 2016 +0200 uxtheme: Use straight assignments instead of CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/draw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 730a26c..753ac36 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -98,9 +98,9 @@ HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc) if(!hParent) hParent = hwnd; if(prc) { - CopyRect(&rt, prc); + rt = *prc; MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2); - + clip = CreateRectRgn(0,0,1,1); hasClip = GetClipRgn(hdc, clip); if(hasClip == -1) @@ -142,7 +142,7 @@ HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, opts.dwFlags = 0; if(pClipRect) { opts.dwFlags |= DTBG_CLIPRECT; - CopyRect(&opts.rcClip, pClipRect); + opts.rcClip = *pClipRect; } return DrawThemeBackgroundEx(hTheme, hdc, iPartId, iStateId, pRect, &opts); } @@ -578,7 +578,7 @@ static HRESULT get_image_part_size (HTHEME hTheme, HDC hdc, int iPartId, int sizingtype = ST_STRETCH; BOOL uniformsizing = FALSE; - CopyRect(&rcDst, prc); + rcDst = *prc; dstSize.x = rcDst.right-rcDst.left; dstSize.y = rcDst.bottom-rcDst.top; @@ -2021,8 +2021,8 @@ HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId, return E_HANDLE; if(pBoundingRect) - CopyRect(&rt, pBoundingRect); - + rt = *pBoundingRect; + hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont); if(SUCCEEDED(hr)) { hFont = CreateFontIndirectW(&logfont);
1
0
0
0
Michael Stefaniuc : user32: Use straight assignments instead of CopyRect() .
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: 07f9f71278c880713f2692966c3a6483a8765beb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07f9f71278c880713f2692966…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 2 19:09:01 2016 +0200 user32: Use straight assignments instead of CopyRect(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 2 +- dlls/user32/edit.c | 2 +- dlls/user32/sysparams.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index c744ee5..a2e8b3c 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -777,7 +777,7 @@ static void CBPaintBorder( } else { - CopyRect(&clientRect, &lphc->textRect); + clientRect = lphc->textRect; InflateRect(&clientRect, EDIT_CONTROL_PADDING(), EDIT_CONTROL_PADDING()); InflateRect(&clientRect, COMBO_XBORDERSIZE(), COMBO_YBORDERSIZE()); diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 23139e9..46fda41 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -4665,7 +4665,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B case EM_GETRECT: if (lParam) - CopyRect((LPRECT)lParam, &es->format_rect); + *((LPRECT)lParam) = es->format_rect; break; case EM_SETRECT: diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index a42a302..63c4ffe 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -1683,7 +1683,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, if (!pvParam) return FALSE; spi_idx = SPI_SETWORKAREA_IDX; - CopyRect( &work_area, pvParam ); + work_area = *(RECT*)pvParam; spi_loaded[spi_idx] = TRUE; ret = TRUE; break; @@ -1702,7 +1702,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, EnumDisplayMonitors( 0, NULL, enum_monitors, (LPARAM)&work_area ); spi_loaded[spi_idx] = TRUE; } - CopyRect( pvParam, &work_area ); + *(RECT*)pvParam = work_area; ret = TRUE; TRACE("work area %s\n", wine_dbgstr_rect( &work_area )); break;
1
0
0
0
Jacek Caban : jscript: Allow accessing arguments values directly from stack.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: da02140b43e8cf12246b5879bfbbf696fcccdb86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da02140b43e8cf12246b5879b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 2 17:41:40 2016 +0200 jscript: Allow accessing arguments values directly from stack. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 132 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 107 insertions(+), 25 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 99eacb1..11b5618 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -50,6 +50,7 @@ typedef struct { enum { EXPRVAL_JSVAL, EXPRVAL_IDREF, + EXPRVAL_STACK_REF, EXPRVAL_INVALID } type; union { @@ -58,6 +59,7 @@ typedef struct { IDispatch *disp; DISPID id; } idref; + unsigned off; HRESULT hres; } u; } exprval_t; @@ -103,10 +105,15 @@ static inline jsval_t stack_top(script_ctx_t *ctx) return ctx->stack[ctx->stack_top-1]; } -static inline jsval_t stack_topn(script_ctx_t *ctx, unsigned n) +static inline jsval_t *stack_top_ref(script_ctx_t *ctx, unsigned n) { assert(ctx->stack_top > ctx->call_ctx->stack_base+n); - return ctx->stack[ctx->stack_top-1-n]; + return ctx->stack+ctx->stack_top-1-n; +} + +static inline jsval_t stack_topn(script_ctx_t *ctx, unsigned n) +{ + return *stack_top_ref(ctx, n); } static inline jsval_t *stack_args(script_ctx_t *ctx, unsigned n) @@ -183,6 +190,11 @@ static HRESULT stack_push_exprval(script_ctx_t *ctx, exprval_t *val) else IDispatch_Release(val->u.idref.disp); return hres; + case EXPRVAL_STACK_REF: + hres = stack_push(ctx, jsval_number(val->u.off)); + if(SUCCEEDED(hres)) + hres = stack_push(ctx, jsval_undefined()); + return hres; case EXPRVAL_INVALID: hres = stack_push(ctx, jsval_undefined()); if(SUCCEEDED(hres)) @@ -194,19 +206,50 @@ static HRESULT stack_push_exprval(script_ctx_t *ctx, exprval_t *val) return E_FAIL; } -static BOOL exprval_from_stack(jsval_t v1, jsval_t v2, exprval_t *r) +static BOOL stack_topn_exprval(script_ctx_t *ctx, unsigned n, exprval_t *r) { - switch(jsval_type(v1)) { + jsval_t v = stack_topn(ctx, n+1); + + switch(jsval_type(v)) { + case JSV_NUMBER: { + call_frame_t *frame = ctx->call_ctx; + unsigned off = get_number(v); + + if(!frame->base_scope->frame && off >= frame->arguments_off) { + DISPID id; + HRESULT hres; + + /* Got stack reference in deoptimized code. Need to convert it back to variable object reference. */ + + hres = jsdisp_get_id(ctx->call_ctx->base_scope->jsobj, frame->function->params[off - frame->arguments_off], 0, &id); + if(FAILED(hres)) { + r->type = EXPRVAL_INVALID; + r->u.hres = hres; + return FALSE; + } + + *stack_top_ref(ctx, n+1) = jsval_obj(jsdisp_addref(frame->base_scope->jsobj)); + *stack_top_ref(ctx, n) = jsval_number(id); + r->type = EXPRVAL_IDREF; + r->u.idref.disp = frame->base_scope->obj; + r->u.idref.id = id; + return TRUE; + } + + r->type = EXPRVAL_STACK_REF; + r->u.off = off; + return TRUE; + } case JSV_OBJECT: r->type = EXPRVAL_IDREF; - r->u.idref.disp = get_object(v1); - assert(is_number(v2)); - r->u.idref.id = get_number(v2); + r->u.idref.disp = get_object(v); + assert(is_number(stack_topn(ctx, n))); + r->u.idref.id = get_number(stack_topn(ctx, n)); return TRUE; case JSV_UNDEFINED: r->type = EXPRVAL_INVALID; - assert(is_number(v2)); - r->u.hres = get_number(v2); + assert(is_number(stack_topn(ctx, n))); + r->u.hres = get_number(stack_topn(ctx, n)); return FALSE; default: assert(0); @@ -216,31 +259,59 @@ static BOOL exprval_from_stack(jsval_t v1, jsval_t v2, exprval_t *r) static inline BOOL stack_pop_exprval(script_ctx_t *ctx, exprval_t *r) { - jsval_t v = stack_pop(ctx); - return exprval_from_stack(stack_pop(ctx), v, r); -} - -static inline BOOL stack_topn_exprval(script_ctx_t *ctx, unsigned n, exprval_t *r) -{ - return exprval_from_stack(stack_topn(ctx, n+1), stack_topn(ctx, n), r); + BOOL ret = stack_topn_exprval(ctx, 0, r); + ctx->stack_top -= 2; + return ret; } static HRESULT exprval_propput(script_ctx_t *ctx, exprval_t *ref, jsval_t v) { - assert(ref->type == EXPRVAL_IDREF); - return disp_propput(ctx, ref->u.idref.disp, ref->u.idref.id, v); + switch(ref->type) { + case EXPRVAL_STACK_REF: { + jsval_t *r = ctx->stack + ref->u.off; + jsval_release(*r); + return jsval_copy(v, r); + } + case EXPRVAL_IDREF: + return disp_propput(ctx, ref->u.idref.disp, ref->u.idref.id, v); + default: + assert(0); + return E_FAIL; + } } static HRESULT exprval_propget(script_ctx_t *ctx, exprval_t *ref, jsval_t *r) { - assert(ref->type == EXPRVAL_IDREF); - return disp_propget(ctx, ref->u.idref.disp, ref->u.idref.id, r); + switch(ref->type) { + case EXPRVAL_STACK_REF: + return jsval_copy(ctx->stack[ref->u.off], r); + case EXPRVAL_IDREF: + return disp_propget(ctx, ref->u.idref.disp, ref->u.idref.id, r); + default: + assert(0); + return E_FAIL; + } } static HRESULT exprval_call(script_ctx_t *ctx, exprval_t *ref, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { - assert(ref->type == EXPRVAL_IDREF); - return disp_call(ctx, ref->u.idref.disp, ref->u.idref.id, flags, argc, argv, r); + switch(ref->type) { + case EXPRVAL_STACK_REF: { + jsval_t v = ctx->stack[ref->u.off]; + + if(!is_object_instance(v)) { + FIXME("invoke %s\n", debugstr_jsval(v)); + return E_FAIL; + } + + return disp_call_value(ctx, get_object(v), NULL, flags, argc, argv, r); + } + case EXPRVAL_IDREF: + return disp_call(ctx, ref->u.idref.disp, ref->u.idref.id, flags, argc, argv, r); + default: + assert(0); + return E_FAIL; + } } /* ECMA-262 3rd Edition 8.7.1 */ @@ -271,6 +342,7 @@ static void exprval_release(exprval_t *val) if(val->u.idref.disp) IDispatch_Release(val->u.idref.disp); return; + case EXPRVAL_STACK_REF: case EXPRVAL_INVALID: return; } @@ -530,9 +602,16 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re if(ctx->call_ctx) { for(scope = ctx->call_ctx->scope; scope; scope = scope->next) { if(scope->frame) { - hres = detach_variable_object(ctx, scope->frame); - if(FAILED(hres)) - return hres; + function_code_t *func = scope->frame->function; + int i; + + for(i = 0; i < func->param_cnt; i++) { + if(!strcmpW(identifier, func->params[i])) { + ret->type = EXPRVAL_STACK_REF; + ret->u.off = scope->frame->arguments_off+i; + return S_OK; + } + } } if(scope->jsobj) hres = jsdisp_get_id(scope->jsobj, identifier, fdexNameImplicit, &id); @@ -1677,6 +1756,9 @@ static HRESULT interp_delete_ident(script_ctx_t *ctx) return hres; switch(exprval.type) { + case EXPRVAL_STACK_REF: + ret = FALSE; + break; case EXPRVAL_IDREF: hres = disp_delete(exprval.u.idref.disp, exprval.u.idref.id, &ret); IDispatch_Release(exprval.u.idref.disp);
1
0
0
0
Jacek Caban : jscript: Use exprval_t to represent property references passed on JS stack.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: abba963006a7f6ac8f70887b2d97431eb128925c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=abba963006a7f6ac8f70887b2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 2 17:40:54 2016 +0200 jscript: Use exprval_t to represent property references passed on JS stack. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/dispex.c | 1 + dlls/jscript/engine.c | 261 +++++++++++++++++++++++++++----------------------- 2 files changed, 144 insertions(+), 118 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=abba963006a7f6ac8f708…
1
0
0
0
Jacek Caban : jscript: Store exception code in exprval_t.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: 7af8330e932e9e04bad194b1af0f99cd8ef03046 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7af8330e932e9e04bad194b1a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 2 17:40:42 2016 +0200 jscript: Store exception code in exprval_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 2c44112..ba408b8 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -58,6 +58,7 @@ typedef struct { IDispatch *disp; DISPID id; } idref; + HRESULT hres; } u; } exprval_t; @@ -221,6 +222,12 @@ static void exprval_release(exprval_t *val) } } +static inline void exprval_set_exception(exprval_t *val, HRESULT hres) +{ + val->type = EXPRVAL_INVALID; + val->u.hres = hres; +} + /* ECMA-262 3rd Edition 8.7.1 */ static HRESULT exprval_to_value(script_ctx_t *ctx, exprval_t *val, jsval_t *ret) { @@ -537,7 +544,7 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re if(lookup_global_members(ctx, identifier, ret)) return S_OK; - ret->type = EXPRVAL_INVALID; + exprval_set_exception(ret, JS_E_UNDEFINED_VARIABLE); return S_OK; } @@ -1060,7 +1067,7 @@ static HRESULT interp_ident(script_ctx_t *ctx) return hres; if(exprval.type == EXPRVAL_INVALID) - return throw_type_error(ctx, JS_E_UNDEFINED_VARIABLE, arg); + return throw_type_error(ctx, exprval.u.hres, arg); hres = exprval_to_value(ctx, &exprval, &v); exprval_release(&exprval);
1
0
0
0
Nikolay Sivov : oleaut32: Fix return value when converting from NULL interface pointers.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: 806ea12766849660a4cfa20e189b6d96ba8f2891 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=806ea12766849660a4cfa20e1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Aug 2 12:03:48 2016 +0300 oleaut32: Fix return value when converting from NULL interface pointers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/vartype.c | 20 ++++++++++++++++++++ dlls/oleaut32/variant.c | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 7d50545..ff495bd 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -5889,6 +5889,16 @@ static void test_IUnknownChangeTypeEx(void) lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + /* NULL IUnknown -> IDispatch */ + V_VT(&vSrc) = VT_UNKNOWN; + V_UNKNOWN(&vSrc) = NULL; + VariantInit(&vDst); + V_DISPATCH(&vDst) = (void*)0xdeadbeef; + hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_DISPATCH); + ok(hres == S_OK && V_VT(&vDst) == VT_DISPATCH && V_DISPATCH(&vDst) == NULL, + "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + S_OK, VT_DISPATCH, NULL, hres, V_VT(&vDst), V_DISPATCH(&vDst)); + V_VT(&vSrc) = VT_UNKNOWN; V_UNKNOWN(&vSrc) = pu; @@ -6033,6 +6043,16 @@ static void test_IDispatchChangeTypeEx(void) lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + /* NULL IDispatch -> IUnknown */ + V_VT(&vSrc) = VT_DISPATCH; + V_DISPATCH(&vSrc) = NULL; + VariantInit(&vDst); + V_UNKNOWN(&vDst) = (void*)0xdeadbeef; + hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); + ok(hres == S_OK && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == NULL, + "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + S_OK, VT_UNKNOWN, NULL, hres, V_VT(&vDst), V_UNKNOWN(&vDst)); + V_VT(&vSrc) = VT_DISPATCH; V_DISPATCH(&vSrc) = pd; diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 6fbb320..17f753a 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -469,7 +469,10 @@ static inline HRESULT VARIANT_Coerce(VARIANTARG* pd, LCID lcid, USHORT wFlags, { case VT_DISPATCH: if (V_DISPATCH(ps) == NULL) + { V_UNKNOWN(pd) = NULL; + res = S_OK; + } else res = IDispatch_QueryInterface(V_DISPATCH(ps), &IID_IUnknown, (LPVOID*)&V_UNKNOWN(pd)); break; @@ -481,7 +484,10 @@ static inline HRESULT VARIANT_Coerce(VARIANTARG* pd, LCID lcid, USHORT wFlags, { case VT_UNKNOWN: if (V_UNKNOWN(ps) == NULL) + { V_DISPATCH(pd) = NULL; + res = S_OK; + } else res = IUnknown_QueryInterface(V_UNKNOWN(ps), &IID_IDispatch, (LPVOID*)&V_DISPATCH(pd)); break;
1
0
0
0
Anton Baskanov : amstream: Implement AMAudioData::SetFormat.
by Alexandre Julliard
02 Aug '16
02 Aug '16
Module: wine Branch: master Commit: d283051b6b9a30cee7f726780faa1b2cd8fec83a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d283051b6b9a30cee7f726780…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu Jul 28 21:59:56 2016 +0600 amstream: Implement AMAudioData::SetFormat. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/audiodata.c | 18 +++++++++-- dlls/amstream/tests/amstream.c | 69 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/dlls/amstream/audiodata.c b/dlls/amstream/audiodata.c index 1c729fc..06ed932 100644 --- a/dlls/amstream/audiodata.c +++ b/dlls/amstream/audiodata.c @@ -185,9 +185,23 @@ static HRESULT WINAPI IAudioDataImpl_GetFormat(IAudioData* iface, WAVEFORMATEX * static HRESULT WINAPI IAudioDataImpl_SetFormat(IAudioData* iface, const WAVEFORMATEX *wave_format) { - FIXME("(%p)->(%p): stub\n", iface, wave_format); + AMAudioDataImpl *This = impl_from_IAudioData(iface); + + TRACE("(%p)->(%p)\n", iface, wave_format); + + if (!wave_format) + { + return E_POINTER; + } - return E_NOTIMPL; + if (WAVE_FORMAT_PCM != wave_format->wFormatTag) + { + return E_INVALIDARG; + } + + This->wave_format = *wave_format; + + return S_OK; } static const struct IAudioDataVtbl AudioData_Vtbl = diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 513d98a..a7999be 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -25,6 +25,9 @@ #include "uuids.h" #include "amstream.h" #include "vfwmsgs.h" +#include "mmreg.h" +#include "ks.h" +#include "ksmedia.h" #define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__) static void _expect_ref(IUnknown* obj, ULONG ref, int line) @@ -787,6 +790,71 @@ out_unknown: IUnknown_Release(unknown); } +static void test_audiodata_set_format(void) +{ + IUnknown *unknown = create_audio_data(); + IAudioData *audio_data = NULL; + WAVEFORMATPCMEX wave_format = {{0}}; + + HRESULT result; + + result = IUnknown_QueryInterface(unknown, &IID_IAudioData, (void **)&audio_data); + if (FAILED(result)) + { + /* test_audiodata_query_interface handles this case */ + skip("No IAudioData\n"); + goto out_unknown; + } + + result = IAudioData_SetFormat(audio_data, NULL); + ok(E_POINTER == result, "got 0x%08x\n", result); + + wave_format.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; + wave_format.Format.nChannels = 2; + wave_format.Format.nSamplesPerSec = 44100; + wave_format.Format.nAvgBytesPerSec = 176400; + wave_format.Format.nBlockAlign = 4; + wave_format.Format.wBitsPerSample = 16; + wave_format.Format.cbSize = 22; + wave_format.Samples.wValidBitsPerSample = 16; + wave_format.dwChannelMask = KSAUDIO_SPEAKER_STEREO; + wave_format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + result = IAudioData_SetFormat(audio_data, &wave_format.Format); + ok(E_INVALIDARG == result, "got 0x%08x\n", result); + + wave_format.Format.wFormatTag = WAVE_FORMAT_PCM; + wave_format.Format.nChannels = 2; + wave_format.Format.nSamplesPerSec = 44100; + wave_format.Format.nAvgBytesPerSec = 176400; + wave_format.Format.nBlockAlign = 4; + wave_format.Format.wBitsPerSample = 16; + wave_format.Format.cbSize = 0; + result = IAudioData_SetFormat(audio_data, &wave_format.Format); + ok(S_OK == result, "got 0x%08x\n", result); + + wave_format.Format.wFormatTag = 0xdead; + wave_format.Format.nChannels = 0xdead; + wave_format.Format.nSamplesPerSec = 0xdeadbeef; + wave_format.Format.nAvgBytesPerSec = 0xdeadbeef; + wave_format.Format.nBlockAlign = 0xdead; + wave_format.Format.wBitsPerSample = 0xdead; + wave_format.Format.cbSize = 0xdead; + result = IAudioData_GetFormat(audio_data, &wave_format.Format); + ok(S_OK == result, "got 0x%08x\n", result); + ok(WAVE_FORMAT_PCM == wave_format.Format.wFormatTag, "got %u\n", wave_format.Format.wFormatTag); + ok(2 == wave_format.Format.nChannels, "got %u\n", wave_format.Format.nChannels); + ok(44100 == wave_format.Format.nSamplesPerSec, "got %u\n", wave_format.Format.nSamplesPerSec); + ok(176400 == wave_format.Format.nAvgBytesPerSec, "got %u\n", wave_format.Format.nAvgBytesPerSec); + ok(4 == wave_format.Format.nBlockAlign, "got %u\n", wave_format.Format.nBlockAlign); + ok(16 == wave_format.Format.wBitsPerSample, "got %u\n", wave_format.Format.wBitsPerSample); + ok(0 == wave_format.Format.cbSize, "got %u\n", wave_format.Format.cbSize); + + IAudioData_Release(audio_data); + +out_unknown: + IUnknown_Release(unknown); +} + START_TEST(amstream) { HANDLE file; @@ -810,6 +878,7 @@ START_TEST(amstream) test_audiodata_set_buffer(); test_audiodata_set_actual(); test_audiodata_get_format(); + test_audiodata_set_format(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
78
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200