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 2022
----- 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
1 participants
596 discussions
Start a n
N
ew thread
Jacek Caban : wow64win: Use in-place conversion in NtUserDrawText thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 44b706f364b1f013c53e9638428cb675f989ecde URL:
https://gitlab.winehq.org/wine/wine/-/commit/44b706f364b1f013c53e9638428cb6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 14:46:05 2022 +0200 wow64win: Use in-place conversion in NtUserDrawText thunk. --- dlls/wow64win/user.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index c8b799881b2..54079700340 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -824,22 +824,19 @@ static NTSTATUS WINAPI wow64_NtUserDrawText( void *arg, ULONG size ) struct draw_text_params *params = arg; struct draw_text_params32 *params32; RECT *rect_ptr = params->ret_rect; - ULONG ret_len, len; + ULONG ret_len; void *ret_ptr; NTSTATUS ret; - len = (size - FIELD_OFFSET( struct draw_text_params, str )) / sizeof(WCHAR); - if (!(params32 = Wow64AllocateTemp( FIELD_OFFSET( struct draw_text_params32, str[len] )))) - return 0; - - params32->hdc = HandleToUlong( params->hdc ); - params32->count = params->count; - params32->rect = params->rect; - params32->ret_rect = 0; + params32 = (struct draw_text_params32 *)(params + 1) - 1; params32->flags = params->flags; - if (len) memcpy( params32->str, params->str, len * sizeof(WCHAR) ); + params32->ret_rect = 0; + params32->rect = params->rect; + params32->count = params->count; + params32->hdc = HandleToUlong( params->hdc ); - ret = Wow64KiUserCallbackDispatcher( NtUserDrawText, params, size, &ret_ptr, &ret_len ); + ret = Wow64KiUserCallbackDispatcher( NtUserDrawText, params32, + size - sizeof(*params) + sizeof(*params32), &ret_ptr, &ret_len ); if (ret_len == sizeof(RECT) && rect_ptr) { *rect_ptr = *(const RECT *)ret_ptr;
1
0
0
0
Jacek Caban : wow64win: Fix output handling in NtUserTrackMouseEvent thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 35cf1fde3c1f9a9b8dc0a3a65b2d6c3f5085b2ba URL:
https://gitlab.winehq.org/wine/wine/-/commit/35cf1fde3c1f9a9b8dc0a3a65b2d6c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:51:49 2022 +0200 wow64win: Fix output handling in NtUserTrackMouseEvent thunk. --- dlls/wow64win/user.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 13d1d31a4a5..c8b799881b2 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3936,6 +3936,7 @@ NTSTATUS WINAPI wow64_NtUserTrackMouseEvent( UINT *args ) DWORD dwHoverTime; } *info32 = get_ptr( &args ); TRACKMOUSEEVENT info; + BOOL ret; if (info32->cbSize != sizeof(*info32)) { @@ -3947,7 +3948,11 @@ NTSTATUS WINAPI wow64_NtUserTrackMouseEvent( UINT *args ) info.dwFlags = info32->dwFlags; info.hwndTrack = UlongToHandle( info32->hwndTrack ); info.dwHoverTime = info32->dwHoverTime; - return NtUserTrackMouseEvent( &info ); + ret = NtUserTrackMouseEvent( &info ); + info32->dwFlags = info.dwFlags; + info32->hwndTrack = HandleToUlong( info.hwndTrack ); + info32->dwHoverTime = info.dwHoverTime; + return ret; } NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args )
1
0
0
0
Jacek Caban : wow64win: Fix NtUserThunkedMenuItemInfo thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: bbc14c9a11ccdaa5671b35ec06d5186d324b8c33 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bbc14c9a11ccdaa5671b35ec06d518…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:50:44 2022 +0200 wow64win: Fix NtUserThunkedMenuItemInfo thunk. --- dlls/wow64win/user.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index c71042f46f4..13d1d31a4a5 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3845,6 +3845,7 @@ NTSTATUS WINAPI wow64_NtUserThunkedMenuItemInfo( UINT *args ) UNICODE_STRING32 *str32 = get_ptr( &args ); MENUITEMINFOW info = { sizeof(info) }, *info_ptr; UNICODE_STRING str; + UINT ret; if (info32) { @@ -3858,19 +3859,58 @@ NTSTATUS WINAPI wow64_NtUserThunkedMenuItemInfo( UINT *args ) info.fState = info32->fState; info.wID = info32->wID; info.hSubMenu = UlongToHandle( info32->hSubMenu ); - info.hbmpChecked = UlongToHandle( info32->hbmpUnchecked ); + info.hbmpChecked = UlongToHandle( info32->hbmpChecked ); + info.hbmpUnchecked = UlongToHandle( info32->hbmpUnchecked ); info.dwItemData = info32->dwItemData; info.dwTypeData = UlongToPtr( info32->dwTypeData ); info.cch = info32->cch; info.hbmpItem = UlongToHandle( info32->hbmpItem ); break; + case NtUserCheckMenuRadioItem: + info.cch = info32->cch; + break; + case NtUserGetMenuItemInfoA: + case NtUserGetMenuItemInfoW: + info.dwTypeData = UlongToPtr( info32->dwTypeData ); + info.cch = info32->cch; + break; } info_ptr = &info; } else info_ptr = NULL; - return NtUserThunkedMenuItemInfo( handle, pos, flags, method, info_ptr, - unicode_str_32to64( &str, str32 )); + ret = NtUserThunkedMenuItemInfo( handle, pos, flags, method, info_ptr, + unicode_str_32to64( &str, str32 )); + + if (info_ptr) + { + switch (method) + { + case NtUserGetMenuItemInfoA: + case NtUserGetMenuItemInfoW: + if (info.fMask & (MIIM_TYPE | MIIM_STRING | MIIM_FTYPE)) + info32->fType = info.fType; + if (info.fMask & (MIIM_TYPE | MIIM_BITMAP)) + info32->hbmpItem = HandleToUlong( info.hbmpItem ); + if (info.fMask & (MIIM_TYPE | MIIM_STRING)) + { + info32->dwTypeData = (UINT_PTR)info.dwTypeData; + info32->cch = info.cch; + } + if (info.fMask & MIIM_STATE) info32->fState = info.fState; + if (info.fMask & MIIM_ID) info32->wID = info.wID; + info32->hSubMenu = HandleToUlong( info.hSubMenu ); + if (info.fMask & MIIM_CHECKMARKS) + { + info32->hbmpChecked = HandleToUlong( info.hbmpChecked ); + info32->hbmpUnchecked = HandleToUlong( info.hbmpUnchecked ); + } + if (info.fMask & MIIM_DATA) info32->dwItemData = info.dwItemData; + break; + } + } + + return ret; } NTSTATUS WINAPI wow64_NtUserToUnicodeEx( UINT *args )
1
0
0
0
Jacek Caban : wow64win: Support GCLP_MENUNAME in NtUserSetClassLongPtr thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 1300cbcb2139997eb76163ed10d8934401a7e5e2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1300cbcb2139997eb76163ed10d893…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:48:27 2022 +0200 wow64win: Support GCLP_MENUNAME in NtUserSetClassLongPtr thunk. --- dlls/wow64win/user.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 1247eb86525..c71042f46f4 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3297,6 +3297,16 @@ NTSTATUS WINAPI wow64_NtUserSetClassLongPtr( UINT *args ) LONG_PTR newval = get_ulong( &args ); BOOL ansi = get_ulong( &args ); + if (offset == GCLP_MENUNAME) + { + struct client_menu_name menu_name; + struct client_menu_name32 *menu_name32 = UlongToPtr( newval ); + NtUserSetClassLong( hwnd, offset, + (UINT_PTR)client_menu_name_32to64( &menu_name, menu_name32 ), ansi ); + client_menu_name_64to32( &menu_name, menu_name32 ); + return 0; + } + return NtUserSetClassLongPtr( hwnd, offset, newval, ansi ); }
1
0
0
0
Jacek Caban : wow64win: Fix handling NULL input32 in NtUserSendInput.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: ab6df6348dbba516f2e5a91c74f6cbb5e39bba67 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ab6df6348dbba516f2e5a91c74f6cb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:47:31 2022 +0200 wow64win: Fix handling NULL input32 in NtUserSendInput. --- dlls/wow64win/user.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index d4b9aac4fb6..1247eb86525 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3222,12 +3222,18 @@ NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args ) INPUT *inputs = NULL; unsigned int i; - if (size != sizeof(*inputs32)) + if (size != sizeof(*inputs32) || !count) { set_last_error32( ERROR_INVALID_PARAMETER ); return 0; } + if (!inputs32) + { + set_last_error32( ERROR_NOACCESS ); + return 0; + } + if (count && !(inputs = Wow64AllocateTemp( count * sizeof(*inputs) ))) return 0;
1
0
0
0
Jacek Caban : wow64win: Fix NtUserGetMenuBarInfo thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 7bc4ca5bef18e3a209e23f7279018502da5946d2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7bc4ca5bef18e3a209e23f72790185…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:37:19 2022 +0200 wow64win: Fix NtUserGetMenuBarInfo thunk. --- dlls/wow64win/user.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index bbe3e37a24d..d4b9aac4fb6 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -2091,12 +2091,13 @@ NTSTATUS WINAPI wow64_NtUserGetMenuBarInfo( UINT *args ) } info.cbSize = sizeof(info); - info.rcBar = info32->rcBar; - info.hMenu = UlongToHandle( info32->hMenu ); - info.hwndMenu = UlongToHandle( info32->hwndMenu ); - info.fBarFocused = info32->fBarFocused; - info.fFocused = info32->fFocused; - return NtUserGetMenuBarInfo( hwnd, id, item, &info ); + if (!NtUserGetMenuBarInfo( hwnd, id, item, &info )) return FALSE; + info32->rcBar = info.rcBar; + info32->hMenu = HandleToUlong( info.hMenu ); + info32->hwndMenu = HandleToUlong( info.hwndMenu ); + info32->fBarFocused = info.fBarFocused; + info32->fFocused = info.fFocused; + return TRUE; } NTSTATUS WINAPI wow64_NtUserGetMenuItemRect( UINT *args ) @@ -2136,7 +2137,7 @@ NTSTATUS WINAPI wow64_NtUserGetMouseMovePointsEx( UINT *args ) if (size != sizeof(MOUSEMOVEPOINT32) || count < 0 || count > ARRAYSIZE( ptin )) { - RtlSetLastWin32Error( ERROR_INVALID_PARAMETER ); + set_last_error32( ERROR_INVALID_PARAMETER ); return -1; }
1
0
0
0
Jacek Caban : wow64win: Fix returning strings in NtUserGetIconInfo thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: bb9bede0e5e0c87347e9c5a79a2cc6d7cbd50179 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bb9bede0e5e0c87347e9c5a79a2cc6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:28:37 2022 +0200 wow64win: Fix returning strings in NtUserGetIconInfo thunk. --- dlls/wow64win/user.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 0d873418536..bbe3e37a24d 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -1981,8 +1981,16 @@ NTSTATUS WINAPI wow64_NtUserGetIconInfo( UINT *args ) info32->yHotspot = info.yHotspot; info32->hbmMask = HandleToUlong( info.hbmMask ); info32->hbmColor = HandleToUlong( info.hbmColor ); - if (module32) module32->Length = module.Length; - if (res_name32) res_name32->Length = res_name.Length; + if (module32) + { + module32->Buffer = PtrToUlong( module.Buffer ); + module32->Length = module.Length; + } + if (res_name32) + { + res_name32->Buffer = PtrToUlong( res_name.Buffer ); + res_name32->Length = res_name.Length; + } return TRUE; }
1
0
0
0
Jacek Caban : wow64win: Fix NtUserGetClipboardData thunk.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: c2accdb16549b705f0e75ae70dd8240f4a280c03 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c2accdb16549b705f0e75ae70dd824…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 17 13:26:23 2022 +0200 wow64win: Fix NtUserGetClipboardData thunk. --- dlls/wow64win/user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 5474abd76da..0d873418536 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -1809,12 +1809,14 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardData( UINT *args ) params.data = UlongToPtr( params32->data ); params.size = params32->size; + params.data_size = params32->data_size; + params.data_only = params32->data_only; ret = NtUserGetClipboardData( format, ¶ms ); + params32->size = params.size; params32->data_size = params.data_size; params32->seqno = params.seqno; - params32->data_only = params.data_only; return HandleToUlong( ret ); }
1
0
0
0
Piotr Caban : compstui: Add CommonPropertySheetUI tests.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 852bbe6d542eda608db442f3979862ba0f0a8124 URL:
https://gitlab.winehq.org/wine/wine/-/commit/852bbe6d542eda608db442f3979862…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Aug 16 15:45:03 2022 +0200 compstui: Add CommonPropertySheetUI tests. --- configure | 1 + configure.ac | 1 + dlls/compstui/tests/Makefile.in | 7 ++ dlls/compstui/tests/compstui.c | 153 ++++++++++++++++++++++++++++++++++++++++ dlls/compstui/tests/rsrc.rc | 28 ++++++++ 5 files changed, 190 insertions(+) diff --git a/configure b/configure index 8585cf11b1f..89500dc8f7a 100755 --- a/configure +++ b/configure @@ -21296,6 +21296,7 @@ wine_fn_config_makefile dlls/comm.drv16 enable_win16 wine_fn_config_makefile dlls/commdlg.dll16 enable_win16 wine_fn_config_makefile dlls/compobj.dll16 enable_win16 wine_fn_config_makefile dlls/compstui enable_compstui +wine_fn_config_makefile dlls/compstui/tests enable_tests wine_fn_config_makefile dlls/comsvcs enable_comsvcs wine_fn_config_makefile dlls/comsvcs/tests enable_tests wine_fn_config_makefile dlls/concrt140 enable_concrt140 diff --git a/configure.ac b/configure.ac index c41f84ae1f2..49d414e1d17 100644 --- a/configure.ac +++ b/configure.ac @@ -2435,6 +2435,7 @@ WINE_CONFIG_MAKEFILE(dlls/comm.drv16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/commdlg.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/compobj.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/compstui) +WINE_CONFIG_MAKEFILE(dlls/compstui/tests) WINE_CONFIG_MAKEFILE(dlls/comsvcs) WINE_CONFIG_MAKEFILE(dlls/comsvcs/tests) WINE_CONFIG_MAKEFILE(dlls/concrt140) diff --git a/dlls/compstui/tests/Makefile.in b/dlls/compstui/tests/Makefile.in new file mode 100644 index 00000000000..8904782645f --- /dev/null +++ b/dlls/compstui/tests/Makefile.in @@ -0,0 +1,7 @@ +TESTDLL = compstui.dll +IMPORTS = comctl32 compstui user32 + +C_SRCS = \ + compstui.c + +RC_SRCS = rsrc.rc diff --git a/dlls/compstui/tests/compstui.c b/dlls/compstui/tests/compstui.c new file mode 100644 index 00000000000..f4e3af459a9 --- /dev/null +++ b/dlls/compstui/tests/compstui.c @@ -0,0 +1,153 @@ +/* + * Copyright 2022 Piotr Caban + * + * 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 <windows.h> +#include <prsht.h> +#include <ddk/compstui.h> + +#include "wine/test.h" + +typedef struct { + WORD cbSize; + WORD Flags; + LPWSTR pTitle; + HWND hWndParent; + HINSTANCE hInst; + union { + HICON hIcon; + ULONG_PTR IconID; + }; +} PROPSHEETUI_INFO_HEADERW; + +static INT_PTR CALLBACK prop_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + if (msg == WM_INITDIALOG) + { + HWND dlg = GetParent(hwnd); + + PostMessageW(dlg, PSM_PRESSBUTTON, PSBTN_OK, 0); + } + return FALSE; +} + +#define ADD_PAGES 0x1 + +static LONG WINAPI propsheetui_callback(PROPSHEETUI_INFO *info, LPARAM lparam) +{ + PROPSHEETUI_INFO_HEADERW *info_header; + + ok(info->cbSize == sizeof(*info), "info->cbSize = %hd\n", info->cbSize); + + switch(info->Reason) + { + case PROPSHEETUI_REASON_BEFORE_INIT: + ok(!info->Version, "info->Version = %hd\n", info->Version); + ok(!info->Flags, "info->Flags = %hd\n", info->Flags); + ok(!info->hComPropSheet, "info->hComPropSheet = %p\n", info->hComPropSheet); + ok(!info->pfnComPropSheet, "info->pfnComPropSheet = %p\n", info->pfnComPropSheet); + ok(!info->Result, "info->Result = %Ix\n", info->Result); + break; + case PROPSHEETUI_REASON_INIT: + ok(info->Version == PROPSHEETUI_INFO_VERSION, "info->Version = %hd\n", info->Version); + ok(info->Flags == PSUIINFO_UNICODE, "info->Flags = %hd\n", info->Flags); + ok(info->hComPropSheet != NULL, "info->hComPropSheet = NULL\n"); + ok(info->pfnComPropSheet != NULL, "info->pfnComPropSheet = NULL\n"); + ok(!info->UserData, "info->UserData = %Ix\n", info->UserData); + ok(!info->Result, "info->Result = %Ix\n", info->Result); + break; + case PROPSHEETUI_REASON_GET_INFO_HEADER: + ok(info->Version == PROPSHEETUI_INFO_VERSION, "info->Version = %hd\n", info->Version); + ok(info->Flags == PSUIINFO_UNICODE, "info->Flags = %hd\n", info->Flags); + ok(info->hComPropSheet != NULL, "info->hComPropSheet = NULL\n"); + ok(info->pfnComPropSheet != NULL, "info->pfnComPropSheet = NULL\n"); + ok(!info->UserData, "info->UserData = %Ix\n", info->UserData); + ok(!info->Result, "info->Result = %Ix\n", info->Result); + + info_header = (PROPSHEETUI_INFO_HEADERW*)lparam; + ok(info_header->cbSize == sizeof(*info_header), "info_header->cbSize = %hd\n", info_header->cbSize); + ok(!info_header->Flags, "info_header->Flags = %hx\n", info_header->Flags); + ok(!info_header->pTitle, "info_header->pTitle = %p\n", info_header->pTitle); + ok(info_header->hWndParent == (HWND)0x4321, "info_header->hWndParent = %p\n", info_header->hWndParent); + ok(!info_header->hInst, "info_header->hInst = %p\n", info_header->hInst); + + info_header->hWndParent = 0; + + if (info->lParamInit & ADD_PAGES) + { + HPROPSHEETPAGE hpsp; + PROPSHEETPAGEW psp; + LONG_PTR ret; + + memset(&psp, 0, sizeof(psp)); + psp.dwSize = sizeof(psp); + U(psp).pszTemplate = L"prop_page1"; + psp.pfnDlgProc = prop_page_proc; + hpsp = CreatePropertySheetPageW(&psp); + ok(hpsp != NULL, "hpsp = %p\n", hpsp); + ret = info->pfnComPropSheet(info->hComPropSheet, CPSFUNC_ADD_HPROPSHEETPAGE, (LPARAM)hpsp, 0); + ok(ret, "ret = 0\n"); + } + break; + case PROPSHEETUI_REASON_DESTROY: + if (info->lParamInit & ADD_PAGES) + ok(lparam, "lparam = 0\n"); + else + ok(!lparam, "lparam = %Ix\n", lparam); + + ok(info->Version == PROPSHEETUI_INFO_VERSION, "info->Version = %hd\n", info->Version); + ok(info->Flags == PSUIINFO_UNICODE, "info->Flags = %hd\n", info->Flags); + ok(info->hComPropSheet != NULL, "info->hComPropSheet = NULL\n"); + ok(info->pfnComPropSheet != NULL, "info->pfnComPropSheet = NULL\n"); + ok(!info->UserData, "info->UserData = %Ix\n", info->UserData); + ok(!info->Result, "info->Result = %Ix\n", info->Result); + break; + default: + ok(0, "unhandled info->Reason = %hd\n", info->Reason); + break; + } + + return 1; +} + +static void test_CommonPropertySheetUI(void) +{ + DWORD res; + LONG ret; + + SetLastError(0xdeadbeef); + res = 0xdeadbeef; + ret = CommonPropertySheetUIW(0, NULL, 0, &res); + ok(ret == ERR_CPSUI_GETLASTERROR, "ret = %ld\n", ret); + ok(res == 0xdeadbeef, "res = %lx\n", res); + ok(!GetLastError(), "CommonPropertySheetUIW error %ld\n", GetLastError()); + + res = 0xdeadbeef; + ret = CommonPropertySheetUIW((HWND)0x4321, propsheetui_callback, 0, &res); + ok(ret == ERR_CPSUI_NO_PROPSHEETPAGE, "CommonPropertySheetUIW returned %ld\n", ret); + ok(!res, "res = %lx\n", res); + + res = 0xdeadbeef; + ret = CommonPropertySheetUIW((HWND)0x4321, propsheetui_callback, ADD_PAGES, &res); + ok(ret == CPSUI_OK, "CommonPropertySheetUIW returned %ld\n", ret); + ok(!res, "res = %lx\n", res); +} + +START_TEST(compstui) +{ + test_CommonPropertySheetUI(); +} diff --git a/dlls/compstui/tests/rsrc.rc b/dlls/compstui/tests/rsrc.rc new file mode 100644 index 00000000000..141fe606a3c --- /dev/null +++ b/dlls/compstui/tests/rsrc.rc @@ -0,0 +1,28 @@ +/* + * Copyright 2022 Piotr Caban + * + * 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 "windef.h" +#include "winuser.h" + +PROP_PAGE1 DIALOG 0, 0, 120, 60 +STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE +CAPTION "Page1" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Test", 10, 10, 6, 100, 8 +}
1
0
0
0
Piotr Caban : compstui: Add partial CommonPropertySheetUIW implementation.
by Alexandre Julliard
17 Aug '22
17 Aug '22
Module: wine Branch: master Commit: 2989886a133641720fae64383c3b724316212531 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2989886a133641720fae64383c3b72…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Aug 16 18:40:48 2022 +0200 compstui: Add partial CommonPropertySheetUIW implementation. --- dlls/compstui/Makefile.in | 3 + dlls/compstui/compstui.rc | 31 ++++ dlls/compstui/compstui_main.c | 358 +++++++++++++++++++++++++++++++++++++++++- po/ar.po | 24 +-- po/ast.po | 25 +-- po/bg.po | 23 +-- po/ca.po | 24 +-- po/cs.po | 24 +-- po/da.po | 24 +-- po/de.po | 24 +-- po/el.po | 25 +-- po/en.po | 22 +-- po/en_US.po | 22 +-- po/eo.po | 24 +-- po/es.po | 24 +-- po/fa.po | 25 +-- po/fi.po | 24 +-- po/fr.po | 24 +-- po/he.po | 23 +-- po/hi.po | 24 +-- po/hr.po | 24 +-- po/hu.po | 24 +-- po/it.po | 24 +-- po/ja.po | 24 +-- po/ko.po | 24 +-- po/lt.po | 24 +-- po/ml.po | 24 +-- po/nb_NO.po | 24 +-- po/nl.po | 24 +-- po/or.po | 24 +-- po/pa.po | 24 +-- po/pl.po | 24 +-- po/pt_BR.po | 24 +-- po/pt_PT.po | 24 +-- po/rm.po | 22 +-- po/ro.po | 24 +-- po/ru.po | 24 +-- po/si.po | 24 +-- po/sk.po | 34 ++-- po/sl.po | 24 +-- po/sr_RS(a)cyrillic.po | 23 +-- po/sr_RS(a)latin.po | 27 ++-- po/sv.po | 24 +-- po/ta.po | 22 +-- po/te.po | 24 +-- po/th.po | 25 +-- po/tr.po | 24 +-- po/uk.po | 24 +-- po/wa.po | 25 +-- po/wine.pot | 22 +-- po/zh_CN.po | 24 +-- po/zh_TW.po | 24 +-- 52 files changed, 1115 insertions(+), 458 deletions(-)
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
60
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200