Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
14bb74cc
Commit
14bb74cc
authored
Apr 28, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uninstaller: Use OEM code page for output.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8fdf3975
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
main.c
programs/uninstaller/main.c
+5
-5
No files found.
programs/uninstaller/main.c
View file @
14bb74cc
...
...
@@ -51,20 +51,20 @@ static const WCHAR PathUninstallW[] = L"Software\\Microsoft\\Windows\\CurrentVer
static
void
output_writeconsole
(
const
WCHAR
*
str
,
DWORD
len
)
{
DWORD
written
,
ret
,
lenA
;
DWORD
written
,
lenA
;
char
*
strA
;
ret
=
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
str
,
len
,
&
written
,
NULL
);
if
(
ret
)
return
;
if
(
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
str
,
len
,
&
written
,
NULL
))
return
;
/* WriteConsole fails if its output is redirected to a file.
* If this occurs, we should use an OEM codepage and call WriteFile.
*/
lenA
=
WideCharToMultiByte
(
Get
ConsoleOutput
CP
(),
0
,
str
,
len
,
NULL
,
0
,
NULL
,
NULL
);
lenA
=
WideCharToMultiByte
(
Get
OEM
CP
(),
0
,
str
,
len
,
NULL
,
0
,
NULL
,
NULL
);
strA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenA
);
if
(
strA
)
{
WideCharToMultiByte
(
Get
ConsoleOutput
CP
(),
0
,
str
,
len
,
strA
,
lenA
,
NULL
,
NULL
);
WideCharToMultiByte
(
Get
OEM
CP
(),
0
,
str
,
len
,
strA
,
lenA
,
NULL
,
NULL
);
WriteFile
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
strA
,
lenA
,
&
written
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
strA
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment