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
485b8dfc
Commit
485b8dfc
authored
Jun 23, 2015
by
Hugh McMaster
Committed by
Alexandre Julliard
Jun 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regsvr32: Add WriteFile fallback if WriteConsole fails.
parent
fdae80d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
regsvr32.c
programs/regsvr32/regsvr32.c
+15
-1
No files found.
programs/regsvr32/regsvr32.c
View file @
485b8dfc
...
...
@@ -93,9 +93,23 @@ static void __cdecl output_write(UINT id, ...)
ret
=
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
str
,
len
,
&
nOut
,
NULL
);
/* WriteConsole fails if its output is redirected to a file.
* If this occurs, we should use an OEM codepage and call WriteFile.
*/
if
(
!
ret
)
WINE_WARN
(
"regsvr32: WriteConsoleW() failed.
\n
"
);
{
DWORD
lenA
;
char
*
strA
;
lenA
=
WideCharToMultiByte
(
GetConsoleOutputCP
(),
0
,
str
,
len
,
NULL
,
0
,
NULL
,
NULL
);
strA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenA
);
if
(
strA
)
{
WideCharToMultiByte
(
GetConsoleOutputCP
(),
0
,
str
,
len
,
strA
,
lenA
,
NULL
,
NULL
);
WriteFile
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
strA
,
lenA
,
&
nOut
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
strA
);
}
}
LocalFree
(
str
);
}
...
...
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