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
846d1640
Commit
846d1640
authored
Aug 22, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmic: Use fwprintf to output error messages.
parent
9c661ff3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
main.c
programs/wmic/main.c
+5
-3
No files found.
programs/wmic/main.c
View file @
846d1640
...
...
@@ -19,6 +19,7 @@
#define COBJMACROS
#include <locale.h>
#include <stdio.h>
#include "windows.h"
#include "ocidl.h"
...
...
@@ -64,7 +65,6 @@ static const WCHAR *find_class( const WCHAR *alias )
static
int
WINAPIV
output_string
(
HANDLE
handle
,
const
WCHAR
*
msg
,
...
)
{
BOOL
output
=
GetStdHandle
(
STD_OUTPUT_HANDLE
)
==
handle
;
static
const
WCHAR
bomW
[]
=
{
0xfeff
};
static
BOOL
bom
;
va_list
va_args
;
...
...
@@ -78,7 +78,7 @@ static int WINAPIV output_string( HANDLE handle, const WCHAR *msg, ... )
if
(
!
WriteConsoleW
(
handle
,
buffer
,
len
,
&
count
,
NULL
))
{
if
(
output
&&
!
bom
)
if
(
!
bom
)
{
WriteFile
(
handle
,
bomW
,
sizeof
(
bomW
),
&
bom_count
,
FALSE
);
bom
=
TRUE
;
...
...
@@ -94,7 +94,7 @@ static int output_error( int msg )
WCHAR
buffer
[
8192
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
buffer
,
ARRAY_SIZE
(
buffer
));
return
output_string
(
GetStdHandle
(
STD_ERROR_HANDLE
)
,
L"%s"
,
buffer
);
return
fwprintf
(
stderr
,
L"%s"
,
buffer
);
}
static
int
output_text
(
const
WCHAR
*
str
,
ULONG
column_width
)
...
...
@@ -340,6 +340,8 @@ int __cdecl wmain(int argc, WCHAR *argv[])
const
WCHAR
*
class
,
*
value
;
int
i
;
setlocale
(
LC_ALL
,
""
);
for
(
i
=
1
;
i
<
argc
&&
argv
[
i
][
0
]
==
'/'
;
i
++
)
WINE_FIXME
(
"command line switch %s not supported
\n
"
,
debugstr_w
(
argv
[
i
])
);
...
...
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