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
June 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
2 participants
791 discussions
Start a n
N
ew thread
Jinoh Kang : iphlpapi/tests: Add tests for GetBestRoute.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: ac9842bc9a196b78d89030823018958ce6057551 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ac9842bc9a196b78d8903082…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sun Jan 16 00:30:43 2022 +0900 iphlpapi/tests: Add tests for GetBestRoute. Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> --- dlls/iphlpapi/tests/iphlpapi.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index af5450f3ab7..9890df70e0e 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1481,9 +1481,32 @@ static void testGetBestInterface(void) bestIfIndex, apiReturn, NO_ERROR ); } +static void testGetBestRoute(void) +{ + DWORD apiReturn; + MIB_IPFORWARDROW bestRoute; + + apiReturn = GetBestRoute( INADDR_ANY, 0, &bestRoute ); + trace( "GetBestRoute([0.0.0.0], 0, [...]) = %lu\n", apiReturn ); + if (apiReturn == ERROR_NOT_SUPPORTED) + { + skip( "GetBestRoute is not supported\n" ); + return; + } + + apiReturn = GetBestRoute( INADDR_ANY, 0, NULL ); + ok( apiReturn == ERROR_INVALID_PARAMETER, + "GetBestRoute([0.0.0.0], 0, NULL) returned %lu, expected %d\n", + apiReturn, ERROR_INVALID_PARAMETER ); + + apiReturn = GetBestRoute( INADDR_LOOPBACK, 0, &bestRoute ); + ok( apiReturn == NO_ERROR, + "GetBestRoute([127.0.0.1], 0, NULL) returned %lu, expected %d\n", + apiReturn, NO_ERROR ); +} + /* still-to-be-tested 98-onward functions: -GetBestRoute IpReleaseAddress IpRenewAddress */ @@ -1493,6 +1516,7 @@ static DWORD CALLBACK testWin98Functions(void *p) testGetAdaptersInfo(); testGetNetworkParams(); testGetBestInterface(); + testGetBestRoute(); return 0; }
1
0
0
0
Jinoh Kang : iphlpapi/tests: Add tests for GetBestInterface.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 3282d7abf23a8dc0beed0b28bc03ad5a195627a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3282d7abf23a8dc0beed0b28…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Sun Jan 16 00:30:06 2022 +0900 iphlpapi/tests: Add tests for GetBestInterface. Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> --- dlls/iphlpapi/tests/iphlpapi.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 214256c18b4..af5450f3ab7 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1457,9 +1457,32 @@ static void testGetNetworkParams(void) } } +static void testGetBestInterface(void) +{ + DWORD apiReturn; + DWORD bestIfIndex; + + apiReturn = GetBestInterface( INADDR_ANY, &bestIfIndex ); + trace( "GetBestInterface([0.0.0.0], {%lu}) = %lu\n", bestIfIndex, apiReturn ); + if (apiReturn == ERROR_NOT_SUPPORTED) + { + skip( "GetBestInterface is not supported\n" ); + return; + } + + apiReturn = GetBestInterface( INADDR_LOOPBACK, NULL ); + ok( apiReturn == ERROR_INVALID_PARAMETER, + "GetBestInterface([127.0.0.1], NULL) returned %lu, expected %d\n", + apiReturn, ERROR_INVALID_PARAMETER ); + + apiReturn = GetBestInterface( INADDR_LOOPBACK, &bestIfIndex ); + ok( apiReturn == NO_ERROR, + "GetBestInterface([127.0.0.1], {%lu}) returned %lu, expected %d\n", + bestIfIndex, apiReturn, NO_ERROR ); +} + /* still-to-be-tested 98-onward functions: -GetBestInterface GetBestRoute IpReleaseAddress IpRenewAddress @@ -1469,6 +1492,7 @@ static DWORD CALLBACK testWin98Functions(void *p) testGetInterfaceInfo(); testGetAdaptersInfo(); testGetNetworkParams(); + testGetBestInterface(); return 0; }
1
0
0
0
Jacek Caban : win32u: Move GetMenuItemID implementation from user32.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 9f267c225893f665ffb0d8c8636166a2b42a4789 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f267c225893f665ffb0d8c8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 21 13:52:55 2022 +0200 win32u: Move GetMenuItemID implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/menu.c | 12 ++---------- dlls/win32u/menu.c | 6 ++++++ include/ntuser.h | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 434353e8892..76144706771 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -537,17 +537,9 @@ INT WINAPI GetMenuItemCount( HMENU menu ) /********************************************************************** * GetMenuItemID (USER32.@) */ -UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos ) +UINT WINAPI GetMenuItemID( HMENU menu, INT pos ) { - POPUPMENU *menu; - UINT id, pos; - - if (!(menu = find_menu_item(hMenu, nPos, MF_BYPOSITION, &pos))) - return -1; - - id = menu->items[pos].fType & MF_POPUP ? -1 : menu->items[pos].wID; - release_menu_ptr(menu); - return id; + return NtUserThunkedMenuItemInfo( menu, pos, MF_BYPOSITION, NtUserGetMenuItemID, NULL, NULL ); } diff --git a/dlls/win32u/menu.c b/dlls/win32u/menu.c index bee04f36dbf..eab97e58d39 100644 --- a/dlls/win32u/menu.c +++ b/dlls/win32u/menu.c @@ -1121,6 +1121,12 @@ UINT WINAPI NtUserThunkedMenuItemInfo( HMENU handle, UINT pos, UINT flags, UINT switch (method) { + case NtUserGetMenuItemID: + if (!(menu = find_menu_item( handle, pos, flags, &i ))) return -1; + ret = menu->items[i].fType & MF_POPUP ? -1 : menu->items[i].wID; + release_menu_ptr( menu ); + break; + case NtUserGetMenuItemInfoA: return get_menu_item_info( handle, pos, flags, info, TRUE ); diff --git a/include/ntuser.h b/include/ntuser.h index d92332f13b9..41b328376a9 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -224,6 +224,7 @@ enum NtUserSetMenuItemInfo, NtUserInsertMenuItem, /* Wine extensions */ + NtUserGetMenuItemID, NtUserGetMenuItemInfoA, NtUserGetMenuItemInfoW, NtUserGetMenuState,
1
0
0
0
Jacek Caban : user32: Reimplement GetMenuStringW on top of NtUserThunkedMenuItemInfo.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 0868ca1578d8dd9a4f8386ddbe8aaffd8b34c40f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0868ca1578d8dd9a4f8386dd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 21 13:19:44 2022 +0200 user32: Reimplement GetMenuStringW on top of NtUserThunkedMenuItemInfo. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/menu.c | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 29a266d2312..434353e8892 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -498,39 +498,20 @@ INT WINAPI GetMenuStringA( HMENU menu, UINT item, char *str, INT count, UINT fla /******************************************************************* * GetMenuStringW (USER32.@) */ -INT WINAPI GetMenuStringW( HMENU hMenu, UINT wItemID, - LPWSTR str, INT nMaxSiz, UINT wFlags ) +INT WINAPI GetMenuStringW( HMENU menu, UINT item, WCHAR *str, INT count, UINT flags ) { - POPUPMENU *menu; - MENUITEM *item; - UINT pos; - INT ret; - - TRACE("menu=%p item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags ); - if (str && nMaxSiz) str[0] = '\0'; - - if (!(menu = find_menu_item(hMenu, wItemID, wFlags, &pos))) - { - SetLastError( ERROR_MENU_ITEM_NOT_FOUND); - return 0; - } - item = &menu->items[pos]; + MENUITEMINFOW info; + int ret; - if (!str || !nMaxSiz) - ret = item->text ? lstrlenW(item->text) : 0; - else if (!item->text) - { - str[0] = 0; - ret = 0; - } - else - { - lstrcpynW( str, item->text, nMaxSiz ); - ret = lstrlenW(str); - } - release_menu_ptr(menu); + TRACE( "menu=%p item=%04x ptr=%p len=%d flags=%04x\n", menu, item, str, count, flags ); - TRACE("returning %s\n", debugstr_w(str)); + info.cbSize = sizeof(info); + info.fMask = MIIM_STRING; + info.dwTypeData = str; + info.cch = count; + ret = NtUserThunkedMenuItemInfo( menu, item, flags, NtUserGetMenuItemInfoW, &info, NULL ); + if (ret) ret = info.cch; + TRACE( "returning %s %d\n", debugstr_w( str ), ret ); return ret; }
1
0
0
0
Jacek Caban : user32: Reimplement GetMenuStringA on top of NtUserThunkedMenuItemInfo.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 992d69b9d128e9c519306e36fd103ea4bd1b76bb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=992d69b9d128e9c519306e36…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 21 13:18:52 2022 +0200 user32: Reimplement GetMenuStringA on top of NtUserThunkedMenuItemInfo. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/menu.c | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index df260b063d9..29a266d2312 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -476,42 +476,21 @@ BOOL WINAPI ChangeMenuW( HMENU hMenu, UINT pos, LPCWSTR data, /******************************************************************* * GetMenuStringA (USER32.@) */ -INT WINAPI GetMenuStringA( - HMENU hMenu, /* [in] menuhandle */ - UINT wItemID, /* [in] menu item (dep. on wFlags) */ - LPSTR str, /* [out] outbuffer. If NULL, func returns entry length*/ - INT nMaxSiz, /* [in] length of buffer. if 0, func returns entry len*/ - UINT wFlags /* [in] MF_ flags */ -) +INT WINAPI GetMenuStringA( HMENU menu, UINT item, char *str, INT count, UINT flags ) { - POPUPMENU *menu; - MENUITEM *item; - UINT pos; - INT ret; - - TRACE("menu=%p item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags ); - if (str && nMaxSiz) str[0] = '\0'; - - if (!(menu = find_menu_item(hMenu, wItemID, wFlags, &pos))) - { - SetLastError( ERROR_MENU_ITEM_NOT_FOUND); - return 0; - } - item = &menu->items[pos]; + MENUITEMINFOA info; + int ret; - if (!item->text) - ret = 0; - else if (!str || !nMaxSiz) - ret = WideCharToMultiByte( CP_ACP, 0, item->text, -1, NULL, 0, NULL, NULL ); - else - { - if (!WideCharToMultiByte( CP_ACP, 0, item->text, -1, str, nMaxSiz, NULL, NULL )) - str[nMaxSiz-1] = 0; - ret = strlen(str); - } - release_menu_ptr(menu); + TRACE( "menu=%p item=%04x ptr=%p len=%d flags=%04x\n", menu, item, str, count, flags ); - TRACE("returning %s\n", debugstr_a(str)); + info.cbSize = sizeof(info); + info.fMask = MIIM_STRING; + info.dwTypeData = str; + info.cch = count; + ret = NtUserThunkedMenuItemInfo( menu, item, flags, NtUserGetMenuItemInfoA, + (MENUITEMINFOW *)&info, NULL ); + if (ret) ret = info.cch; + TRACE( "returning %s %d\n", debugstr_a( str ), ret ); return ret; }
1
0
0
0
Jacek Caban : win32u: Move get_menu_item_info implementation from user32.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 7099c8d7e85a88677d0992cb59fa3c225eb3322f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7099c8d7e85a88677d0992cb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 14 19:39:06 2022 +0200 win32u: Move get_menu_item_info implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/menu.c | 212 ++--------------------------------------------------- dlls/win32u/menu.c | 123 +++++++++++++++++++++++++++++++ include/ntuser.h | 2 + 3 files changed, 131 insertions(+), 206 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7099c8d7e85a88677d09…
1
0
0
0
Jacek Caban : win32u: Move WM_GETTEXT implementation from user32.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 4a53c479e8647636b327a81d9f3537d7d5c0ae03 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a53c479e8647636b327a81d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jun 21 00:42:05 2022 +0200 win32u: Move WM_GETTEXT implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/defwnd.c | 71 ---------------------------------------------------- dlls/win32u/defwnd.c | 34 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 71 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index c72789ac963..d29846ad623 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -30,8 +30,6 @@ #include "win.h" #include "user_private.h" #include "controls.h" -#include "wine/server.h" -#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(win); @@ -73,28 +71,6 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType ) } -static LPARAM DEFWND_GetTextA( WND *wndPtr, LPSTR dest, WPARAM wParam ) -{ - LPARAM result = 0; - - __TRY - { - if (wndPtr->text) - { - if (!WideCharToMultiByte( CP_ACP, 0, wndPtr->text, -1, - dest, wParam, NULL, NULL )) dest[wParam-1] = 0; - result = strlen( dest ); - } - else dest[0] = '\0'; - } - __EXCEPT_PAGE_FAULT - { - return 0; - } - __ENDTRY - return result; -} - /*********************************************************************** * DefWindowProcA (USER32.@) * @@ -145,19 +121,6 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; - case WM_GETTEXT: - if (wParam) - { - LPSTR dest = (LPSTR)lParam; - WND *wndPtr = WIN_GetPtr( hwnd ); - - if (!wndPtr) break; - result = DEFWND_GetTextA( wndPtr, dest, wParam ); - - WIN_ReleasePtr( wndPtr ); - } - break; - case WM_IME_CHAR: if (HIBYTE(wParam)) PostMessageA( hwnd, WM_CHAR, HIBYTE(wParam), lParam ); PostMessageA( hwnd, WM_CHAR, LOBYTE(wParam), lParam ); @@ -236,28 +199,6 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam } -static LPARAM DEFWND_GetTextW( WND *wndPtr, LPWSTR dest, WPARAM wParam ) -{ - LPARAM result = 0; - - __TRY - { - if (wndPtr->text) - { - lstrcpynW( dest, wndPtr->text, wParam ); - result = lstrlenW( dest ); - } - else dest[0] = '\0'; - } - __EXCEPT_PAGE_FAULT - { - return 0; - } - __ENDTRY - - return result; -} - /*********************************************************************** * DefWindowProcW (USER32.@) Calls default window message handler * @@ -315,18 +256,6 @@ LRESULT WINAPI DefWindowProcW( result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; - case WM_GETTEXT: - if (wParam) - { - LPWSTR dest = (LPWSTR)lParam; - WND *wndPtr = WIN_GetPtr( hwnd ); - - if (!wndPtr) break; - result = DEFWND_GetTextW( wndPtr, dest, wParam ); - WIN_ReleasePtr( wndPtr ); - } - break; - case WM_IME_CHAR: PostMessageW( hwnd, WM_CHAR, wParam, lParam ); break; diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index c54dbdb710c..af51b933d49 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2519,6 +2519,40 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, } break; + case WM_GETTEXT: + if (wparam) + { + WND *win; + + if (!(win = get_win_ptr( hwnd ))) break; + + __TRY + { + if (ansi) + { + char *dest = (char *)lparam; + if (win->text) + result = win32u_wctomb( &ansi_cp, dest, wparam - 1, + win->text, wcslen( win->text )); + dest[result] = 0; + } + else + { + WCHAR *dest = (WCHAR *)lparam; + if (win->text) result = min( wcslen( win->text ), wparam - 1 ); + if (result) memcpy( dest, win->text, result * sizeof(WCHAR) ); + dest[result] = 0; + } + } + __EXCEPT + { + } + __ENDTRY + + release_win_ptr( win ); + } + break; + case WM_SETICON: result = (LRESULT)set_window_icon( hwnd, wparam, (HICON)lparam ); if ((get_window_long( hwnd, GWL_STYLE ) & WS_CAPTION) == WS_CAPTION)
1
0
0
0
Jacek Caban : win32u: Move WM_GETTEXTLENGTH implementation from user32.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 9260d114b1e73810b86cfcf535d54d30fdb56ed3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9260d114b1e73810b86cfcf5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 20 17:58:21 2022 +0200 win32u: Move WM_GETTEXTLENGTH implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/user32/defwnd.c | 18 ------------------ dlls/win32u/defwnd.c | 14 ++++++++++++++ dlls/win32u/font.c | 22 ++++++++++++++++++++++ dlls/win32u/tests/win32u.c | 9 +++++++++ dlls/win32u/win32u_private.h | 1 + 5 files changed, 46 insertions(+), 18 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 16442b6899e..c72789ac963 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -145,16 +145,6 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; - case WM_GETTEXTLENGTH: - { - WND *wndPtr = WIN_GetPtr( hwnd ); - if (wndPtr && wndPtr->text) - result = WideCharToMultiByte( CP_ACP, 0, wndPtr->text, lstrlenW(wndPtr->text), - NULL, 0, NULL, NULL ); - WIN_ReleasePtr( wndPtr ); - } - break; - case WM_GETTEXT: if (wParam) { @@ -325,14 +315,6 @@ LRESULT WINAPI DefWindowProcW( result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; - case WM_GETTEXTLENGTH: - { - WND *wndPtr = WIN_GetPtr( hwnd ); - if (wndPtr && wndPtr->text) result = (LRESULT)lstrlenW(wndPtr->text); - WIN_ReleasePtr( wndPtr ); - } - break; - case WM_GETTEXT: if (wParam) { diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 90323e304fc..c54dbdb710c 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2505,6 +2505,20 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, handle_nc_paint( hwnd , (HRGN)1 ); /* repaint caption */ break; + case WM_GETTEXTLENGTH: + { + WND *win = get_win_ptr( hwnd ); + if (win && win->text) + { + if (ansi) + result = win32u_wctomb_size( &ansi_cp, win->text, wcslen( win->text )); + else + result = wcslen( win->text ); + } + release_win_ptr( win ); + } + break; + case WM_SETICON: result = (LRESULT)set_window_icon( hwnd, wparam, (HICON)lparam ); if ((get_window_long( hwnd, GWL_STYLE ) & WS_CAPTION) == WS_CAPTION) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 39b195fe25a..5bf59903308 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -3230,6 +3230,28 @@ DWORD win32u_wctomb( CPTABLEINFO *info, char *dst, DWORD dstlen, const WCHAR *sr return ret; } +DWORD win32u_wctomb_size( CPTABLEINFO *info, const WCHAR *src, DWORD srclen ) +{ + DWORD ret; + + if (info->CodePage == CP_UTF8) + { + RtlUnicodeToUTF8N( NULL, 0, &ret, src, srclen * sizeof(WCHAR) ); + } + else if(info->DBCSCodePage) + { + WCHAR *uni2cp = info->WideCharTable; + for (ret = srclen; srclen; srclen--, src++) + if (uni2cp[*src] & 0xff00) ret++; + } + else + { + ret = srclen; + } + + return ret; +} + DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *src, DWORD srclen ) { DWORD ret; diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 11820859358..dc1638f37ab 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -494,6 +494,12 @@ static void test_window_text(void) ok( len == 4, "len = %d\n", len ); ok( !lstrcmpW( buf, L"test" ), "buf = %s\n", wine_dbgstr_w(buf) ); + res = NtUserMessageCall( hwnd, WM_GETTEXTLENGTH, 0, 0, 0, NtUserDefWindowProc, TRUE ); + ok( res == 4, "res = %Id\n", res ); + + res = NtUserMessageCall( hwnd, WM_GETTEXTLENGTH, 0, 0, 0, NtUserDefWindowProc, FALSE ); + ok( res == 4, "res = %Id\n", res ); + res = NtUserMessageCall( hwnd, WM_SETTEXT, 0, (LPARAM)"TestA", 0, NtUserDefWindowProc, TRUE ); ok( res == 1, "res = %Id\n", res ); @@ -502,6 +508,9 @@ static void test_window_text(void) ok( len == 5, "len = %d\n", len ); ok( !lstrcmpW( buf, L"TestA" ), "buf = %s\n", wine_dbgstr_w(buf) ); + res = NtUserMessageCall( hwnd, WM_GETTEXTLENGTH, 0, 0, 0, NtUserDefWindowProc, TRUE ); + ok( res == 5, "res = %Id\n", res ); + DestroyWindow( hwnd ); } diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 808d3f83e37..468375f1ddf 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -575,6 +575,7 @@ DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *sr DWORD srclen ) DECLSPEC_HIDDEN; DWORD win32u_wctomb( CPTABLEINFO *info, char *dst, DWORD dstlen, const WCHAR *src, DWORD srclen ) DECLSPEC_HIDDEN; +DWORD win32u_wctomb_size( CPTABLEINFO *info, const WCHAR *src, DWORD srclen ) DECLSPEC_HIDDEN; static inline WCHAR *win32u_wcsdup( const WCHAR *str ) {
1
0
0
0
Hans Leidekker : secur32: Implement SECPKG_ATTR_CIPHER_INFO.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 99e2f4caca474d14efd55e6a008bd57c720e0fd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99e2f4caca474d14efd55e6a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Jun 20 20:06:55 2022 +0200 secur32: Implement SECPKG_ATTR_CIPHER_INFO. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53180
--- dlls/secur32/schannel.c | 8 ++ dlls/secur32/schannel_gnutls.c | 222 +++++++++++++++++++++++++++++++++++++++++ dlls/secur32/secur32_priv.h | 7 ++ dlls/secur32/tests/schannel.c | 29 ++++++ 4 files changed, 266 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=99e2f4caca474d14efd5…
1
0
0
0
Hans Leidekker : include: Move SECPKG_ATTR defines to a new header and add missing definitions.
by Alexandre Julliard
21 Jun '22
21 Jun '22
Module: wine Branch: master Commit: 4ce39cd09b1ab740c2b493dfabc99b4696cb6116 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ce39cd09b1ab740c2b493df…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Jun 20 19:59:06 2022 +0200 include: Move SECPKG_ATTR defines to a new header and add missing definitions. --- include/minschannel.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/schannel.h | 39 +++++++++++++++++++++++---------------- 2 files changed, 67 insertions(+), 16 deletions(-) diff --git a/include/minschannel.h b/include/minschannel.h new file mode 100644 index 00000000000..c30ae85922b --- /dev/null +++ b/include/minschannel.h @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Hans Leidekker for CodeWeavers + * + * 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_MINSCHANNEL_H__ +#define __WINE_MINSCHANNEL_H__ + +#define SECPKG_ATTR_ISSUER_LIST 0x50 +#define SECPKG_ATTR_REMOTE_CRED 0x51 +#define SECPKG_ATTR_LOCAL_CRED 0x52 +#define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53 +#define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54 +#define SECPKG_ATTR_ROOT_STORE 0x55 +#define SECPKG_ATTR_SUPPORTED_ALGS 0x56 +#define SECPKG_ATTR_CIPHER_STRENGTHS 0x57 +#define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58 +#define SECPKG_ATTR_ISSUER_LIST_EX 0x59 +#define SECPKG_ATTR_CONNECTION_INFO 0x5a +#define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b +#define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c +#define SECPKG_ATTR_SESSION_INFO 0x5d +#define SECPKG_ATTR_APP_DATA 0x5e +#define SECPKG_ATTR_REMOTE_CERTIFICATES 0x5f +#define SECPKG_ATTR_CLIENT_CERT_POLICY 0x60 +#define SECPKG_ATTR_CC_POLICY_RESULT 0x61 +#define SECPKG_ATTR_USE_NCRYPT 0x62 +#define SECPKG_ATTR_LOCAL_CERT_INFO 0x63 +#define SECPKG_ATTR_CIPHER_INFO 0x64 + +#endif /* __WINE_MINSCHANNEL_H__ */ diff --git a/include/schannel.h b/include/schannel.h index 556ec1882c9..3aa85832fd3 100644 --- a/include/schannel.h +++ b/include/schannel.h @@ -18,6 +18,7 @@ #ifndef __WINE_SCHANNEL_H__ #define __WINE_SCHANNEL_H__ +#include <minschannel.h> #include <wincrypt.h> /* Package names */ @@ -179,22 +180,6 @@ static const WCHAR SCHANNEL_NAME_W[] = { 'S','c','h','a','n','n','e','l',0 }; #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096 -#define SECPKG_ATTR_ISSUER_LIST 0x50 -#define SECPKG_ATTR_REMOTE_CRED 0x51 -#define SECPKG_ATTR_LOCAL_CRED 0x52 -#define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53 -#define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54 -#define SECPKG_ATTR_ROOT_STORE 0x55 -#define SECPKG_ATTR_SUPPORTED_ALGS 0x56 -#define SECPKG_ATTR_CIPHER_STRENGTHS 0x57 -#define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58 -#define SECPKG_ATTR_ISSUER_LIST_EX 0x59 -#define SECPKG_ATTR_CONNECTION_INFO 0x5a -#define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b -#define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c -#define SECPKG_ATTR_SESSION_INFO 0x5d -#define SECPKG_ATTR_APP_DATA 0x5e - #define UNISP_RPC_ID 14 struct _HMAPPER; @@ -299,4 +284,26 @@ typedef struct _SecPkgContext_ConnectionInfo DWORD dwExchStrength; } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo; +#define SECPKGCONTEXT_CIPHERINFO_V1 1 +#define SZ_ALG_MAX_SIZE 64 + +typedef struct _SecPkgContext_CipherInfo +{ + DWORD dwVersion; + DWORD dwProtocol; + DWORD dwCipherSuite; + DWORD dwBaseCipherSuite; + WCHAR szCipherSuite[SZ_ALG_MAX_SIZE]; + WCHAR szCipher[SZ_ALG_MAX_SIZE]; + DWORD dwCipherLen; + DWORD dwCipherBlockLen; + WCHAR szHash[SZ_ALG_MAX_SIZE]; + DWORD dwHashLen; + WCHAR szExchange[SZ_ALG_MAX_SIZE]; + DWORD dwMinExchangeLen; + DWORD dwMaxExchangeLen; + WCHAR szCertificate[SZ_ALG_MAX_SIZE]; + DWORD dwKeyType; +} SecPkgContext_CipherInfo, *PSecPkgContext_CipherInfo; + #endif /* __WINE_SCHANNEL_H__ */
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
80
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
Results per page:
10
25
50
100
200