Jacek Caban : wineconsole: Use IOCTL_CONDRV_GET_TITLE in WINECON_GetConsoleTitle.

Alexandre Julliard julliard at winehq.org
Wed Jul 15 16:44:47 CDT 2020


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jul 15 17:34:34 2020 +0200

wineconsole: Use IOCTL_CONDRV_GET_TITLE in WINECON_GetConsoleTitle.

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

---

 programs/wineconsole/wineconsole.c | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 94ef6c3dec..5040800946 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -173,22 +173,13 @@ static void WINECON_SetInsertMode(HANDLE hConIn, unsigned int enable)
  */
 BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len)
 {
-    BOOL ret;
+    DWORD size;
 
-    if (len < sizeof(WCHAR)) return FALSE;
+    if (!DeviceIoControl(hConIn, IOCTL_CONDRV_GET_TITLE, NULL, 0, buffer, len - sizeof(WCHAR), &size, NULL))
+        return FALSE;
 
-    SERVER_START_REQ( get_console_input_info )
-    {
-        req->handle = wine_server_obj_handle( hConIn );
-        wine_server_set_reply( req, buffer, len - sizeof(WCHAR) );
-        if ((ret = !wine_server_call_err( req )))
-        {
-            len = wine_server_reply_size( reply );
-            buffer[len / sizeof(WCHAR)] = 0;
-        }
-    }
-    SERVER_END_REQ;
-    return ret;
+    buffer[size / sizeof(WCHAR)] = 0;
+    return TRUE;
 }
 
 /******************************************************************




More information about the wine-cvs mailing list