Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
86ebd5ee
Commit
86ebd5ee
authored
Jul 15, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use Unicode when printing system error messages.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8dfc25ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
regedit.c
programs/regedit/regedit.c
+1
-1
regproc.c
programs/regedit/regproc.c
+13
-12
regproc.h
programs/regedit/regproc.h
+1
-0
No files found.
programs/regedit/regedit.c
View file @
86ebd5ee
...
...
@@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
regedit
);
static
void
output_writeconsole
(
const
WCHAR
*
str
,
DWORD
wlen
)
void
output_writeconsole
(
const
WCHAR
*
str
,
DWORD
wlen
)
{
DWORD
count
,
ret
;
...
...
programs/regedit/regproc.c
View file @
86ebd5ee
...
...
@@ -31,8 +31,11 @@
#include <winreg.h>
#include <assert.h>
#include <wine/unicode.h>
#include <wine/debug.h>
#include "regproc.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
regedit
);
#define REG_VAL_BUF_SIZE 4096
/* maximal number of characters in hexadecimal data line,
...
...
@@ -856,20 +859,18 @@ static void processRegLinesW(FILE *in)
static
void
REGPROC_print_error
(
void
)
{
LPVOID
lpMsgBuf
;
DWORD
error_code
;
int
status
;
error_code
=
GetLastError
();
status
=
FormatMessageA
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
,
NULL
,
error_code
,
0
,
(
LPSTR
)
&
lpMsgBuf
,
0
,
NULL
);
if
(
!
status
)
{
fprintf
(
stderr
,
"regedit: Cannot display message for error %d, status %d
\n
"
,
error_code
,
GetLastError
());
WCHAR
*
str
;
DWORD
error_code
,
len
;
error_code
=
GetLastError
();
len
=
FormatMessageW
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
,
NULL
,
error_code
,
0
,
(
WCHAR
*
)
&
str
,
0
,
NULL
);
if
(
len
==
0
&&
GetLastError
()
!=
NO_ERROR
)
{
WINE_FIXME
(
"FormatMessage failed: le=%u, previous=%u
\n
"
,
GetLastError
(),
error_code
);
exit
(
1
);
}
puts
(
lpMsgBuf
);
LocalFree
(
lpMsgBuf
);
output_writeconsole
(
str
,
len
);
LocalFree
(
str
);
exit
(
1
);
}
...
...
programs/regedit/regproc.h
View file @
86ebd5ee
...
...
@@ -24,6 +24,7 @@
#define REG_FORMAT_5 1
#define REG_FORMAT_4 2
void
output_writeconsole
(
const
WCHAR
*
str
,
DWORD
wlen
);
void
__cdecl
output_message
(
unsigned
int
id
,
...);
BOOL
export_registry_key
(
WCHAR
*
file_name
,
WCHAR
*
reg_key_name
,
DWORD
format
);
...
...
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