Move console input/output codepages to server

Dmitry Timoshkov dmitry at codeweavers.com
Thu Apr 19 22:56:18 CDT 2007


"Kirill K. Smirnov" <lich at math.spbu.ru> wrote:

> @@ -141,12 +138,19 @@ HWND WINAPI GetConsoleWindow(VOID)
>   */
>  UINT WINAPI GetConsoleCP(VOID)
>  {
> -    if (!console_input_codepage) 
> +    BOOL ret;
> +    UINT codepage = GetOEMCP(); /* default value */
> +
> +    SERVER_START_REQ(get_console_input_info)
>      {
> -        console_input_codepage = GetOEMCP();
> - TRACE("%u\n", console_input_codepage);
> +        req->handle = 0;
> +        ret = !wine_server_call_err( req );
> +        if (ret && reply->codepage)
> +            codepage = reply->codepage;

Did you test what happens when an app sets console code page to a pseudo
cp like CP_ACP (0)? Your code will force code page to be always equal to
what GetOEMCP returns in that case.

-- 
Dmitry.



More information about the wine-devel mailing list