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
db074ee9
Commit
db074ee9
authored
Jul 09, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Convert openKey to Unicode.
parent
2e7b8cbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
regproc.c
programs/regedit/regproc.c
+12
-16
No files found.
programs/regedit/regproc.c
View file @
db074ee9
...
...
@@ -418,10 +418,10 @@ static LONG setValue(WCHAR* val_name, WCHAR* val_data)
* A helper function for processRegEntry() that opens the current key.
* That key must be closed by calling closeKey().
*/
static
LONG
openKey
(
LPSTR
stdInput
)
static
LONG
openKey
W
(
WCHAR
*
stdInput
)
{
HKEY
keyClass
;
LPSTR
keyPath
;
WCHAR
*
keyPath
;
DWORD
dwDisp
;
LONG
res
;
...
...
@@ -430,10 +430,10 @@ static LONG openKey(LPSTR stdInput)
return
ERROR_INVALID_PARAMETER
;
/* Get the registry class */
if
(
!
parseKeyName
(
stdInput
,
&
keyClass
,
&
keyPath
))
if
(
!
parseKeyName
W
(
stdInput
,
&
keyClass
,
&
keyPath
))
return
ERROR_INVALID_PARAMETER
;
res
=
RegCreateKeyEx
(
res
=
RegCreateKeyEx
W
(
keyClass
,
/* Class */
keyPath
,
/* Sub Key */
0
,
/* MUST BE 0 */
...
...
@@ -446,15 +446,9 @@ static LONG openKey(LPSTR stdInput)
REG_OPENED_EXISTING_KEY */
if
(
res
==
ERROR_SUCCESS
)
{
currentKeyName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
stdInput
)
+
1
);
CHECK_ENOUGH_MEMORY
(
currentKeyName
);
strcpy
(
currentKeyName
,
stdInput
);
}
currentKeyName
=
GetMultiByteString
(
stdInput
);
else
{
currentKeyHandle
=
NULL
;
}
return
res
;
...
...
@@ -558,6 +552,7 @@ static void processRegEntry(LPSTR stdInput)
if
(
stdInput
[
0
]
==
'['
)
/* We are reading a new key */
{
LPSTR
keyEnd
;
WCHAR
*
stdInputW
;
closeKey
();
/* Close the previous key */
/* Get rid of the square brackets */
...
...
@@ -566,17 +561,18 @@ static void processRegEntry(LPSTR stdInput)
if
(
keyEnd
)
*
keyEnd
=
'\0'
;
stdInputW
=
GetWideString
(
stdInput
);
/* delete the key if we encounter '-' at the start of reg key */
if
(
stdInput
[
0
]
==
'-'
)
{
WCHAR
*
stdInputW
=
GetWideString
(
stdInput
+
1
);
delete_registry_key
(
stdInputW
);
HeapFree
(
GetProcessHeap
(),
0
,
stdInputW
);
}
else
if
(
openKey
(
stdInput
)
!=
ERROR_SUCCESS
)
delete_registry_key
(
stdInputW
+
1
);
}
else
if
(
openKeyW
(
stdInputW
)
!=
ERROR_SUCCESS
)
{
fprintf
(
stderr
,
"%s: setValue failed to open key %s
\n
"
,
getAppName
(),
stdInput
);
}
HeapFree
(
GetProcessHeap
(),
0
,
stdInputW
);
}
else
if
(
currentKeyHandle
&&
((
stdInput
[
0
]
==
'@'
)
||
/* reading a default @=data pair */
(
stdInput
[
0
]
==
'\"'
)))
/* reading a new value=data pair */
...
...
@@ -1017,7 +1013,7 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name)
if
(
reg_key_name
&&
reg_key_name
[
0
])
{
HKEY
reg_key_class
;
CHAR
*
branch_name
;
CHAR
*
branch_name
=
NULL
;
HKEY
key
;
REGPROC_resize_char_buffer
(
&
reg_key_name_buf
,
&
reg_key_name_len
,
...
...
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