Jacek Caban : user32: Use NtUserInternalGetWindowText in GetWindowText.

Alexandre Julliard julliard at winehq.org
Tue Mar 8 16:10:48 CST 2022


Module: wine
Branch: master
Commit: 6c49dfff14bff4a07570c8e42465c87bfe9b1e8e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6c49dfff14bff4a07570c8e42465c87bfe9b1e8e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Mar  8 14:23:41 2022 +0100

user32: Use NtUserInternalGetWindowText in GetWindowText.

Instead of get_server_window_text.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/win.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index fc31e0cc01d..9c2ceedd6a3 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -2927,7 +2927,7 @@ INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount )
         else if ((buffer = HeapAlloc( GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR) )))
         {
             /* when window belongs to other process, don't send a message */
-            get_server_window_text( hwnd, buffer, nMaxCount );
+            NtUserInternalGetWindowText( hwnd, buffer, nMaxCount );
             if (!WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpString, nMaxCount, NULL, NULL ))
                 lpString[nMaxCount-1] = 0;
             HeapFree( GetProcessHeap(), 0, buffer );
@@ -2964,8 +2964,7 @@ INT WINAPI GetWindowTextW( HWND hwnd, LPWSTR lpString, INT nMaxCount )
         else
         {
             /* when window belongs to other process, don't send a message */
-            get_server_window_text( hwnd, lpString, nMaxCount );
-            ret = lstrlenW(lpString);
+            ret = NtUserInternalGetWindowText( hwnd, lpString, nMaxCount );
         }
     }
     __EXCEPT_PAGE_FAULT




More information about the wine-cvs mailing list