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
bde3cf9b
Commit
bde3cf9b
authored
Jun 14, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: The registry functions return standard error codes, not HRESULTs.
parent
804ec044
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
regproc.c
programs/regedit/regproc.c
+14
-14
No files found.
programs/regedit/regproc.c
View file @
bde3cf9b
...
...
@@ -209,9 +209,9 @@ static void REGPROC_unescape_string(LPSTR str)
* val_name - name of the registry value
* val_data - registry value data
*/
static
HRESULT
setValue
(
LPSTR
val_name
,
LPSTR
val_data
)
static
LONG
setValue
(
LPSTR
val_name
,
LPSTR
val_data
)
{
HRESULT
hR
es
;
LONG
r
es
;
DWORD
dwDataType
,
dwParseType
;
LPBYTE
lpbData
;
DWORD
dwData
,
dwLen
;
...
...
@@ -259,7 +259,7 @@ static HRESULT setValue(LPSTR val_name, LPSTR val_data)
return
ERROR_INVALID_DATA
;
}
hR
es
=
RegSetValueEx
(
r
es
=
RegSetValueEx
(
currentKeyHandle
,
val_name
,
0
,
/* Reserved */
...
...
@@ -268,7 +268,7 @@ static HRESULT setValue(LPSTR val_name, LPSTR val_data)
dwLen
);
if
(
dwParseType
==
REG_BINARY
)
HeapFree
(
GetProcessHeap
(),
0
,
lpbData
);
return
hR
es
;
return
r
es
;
}
...
...
@@ -352,10 +352,10 @@ static LPSTR getRegKeyName(LPSTR lpLine)
/******************************************************************************
* Open the key
*/
static
HRESULT
openKey
(
LPSTR
stdInput
)
static
LONG
openKey
(
LPSTR
stdInput
)
{
DWORD
dwDisp
;
HRESULT
hR
es
;
DWORD
dwDisp
;
LONG
r
es
;
/* Sanity checks */
if
(
stdInput
==
NULL
)
...
...
@@ -364,14 +364,14 @@ static HRESULT openKey( LPSTR stdInput)
/* Get the registry class */
currentKeyClass
=
getRegClass
(
stdInput
);
/* Sets global variable */
if
(
currentKeyClass
==
(
HKEY
)
ERROR_INVALID_PARAMETER
)
return
(
HRESULT
)
ERROR_INVALID_PARAMETER
;
return
ERROR_INVALID_PARAMETER
;
/* Get the key name */
currentKeyName
=
getRegKeyName
(
stdInput
);
/* Sets global variable */
if
(
currentKeyName
==
NULL
)
return
ERROR_INVALID_PARAMETER
;
hR
es
=
RegCreateKeyEx
(
r
es
=
RegCreateKeyEx
(
currentKeyClass
,
/* Class */
currentKeyName
,
/* Sub Key */
0
,
/* MUST BE 0 */
...
...
@@ -383,10 +383,10 @@ static HRESULT openKey( LPSTR stdInput)
&
dwDisp
);
/* disposition, REG_CREATED_NEW_KEY or
REG_OPENED_EXISTING_KEY */
if
(
hR
es
==
ERROR_SUCCESS
)
if
(
r
es
==
ERROR_SUCCESS
)
bTheKeyIsOpen
=
TRUE
;
return
hR
es
;
return
r
es
;
}
...
...
@@ -420,7 +420,7 @@ static void processSetValue(LPSTR line)
LPSTR
val_data
;
/* registry value data */
int
line_idx
=
0
;
/* current character under analysis */
HRESULT
hRes
=
0
;
LONG
res
;
/* get value name */
if
(
line
[
line_idx
]
==
'@'
&&
line
[
line_idx
+
1
]
==
'='
)
{
...
...
@@ -458,8 +458,8 @@ static void processSetValue(LPSTR line)
val_data
=
line
+
line_idx
;
REGPROC_unescape_string
(
val_name
);
hR
es
=
setValue
(
val_name
,
val_data
);
if
(
hR
es
!=
ERROR_SUCCESS
)
r
es
=
setValue
(
val_name
,
val_data
);
if
(
r
es
!=
ERROR_SUCCESS
)
fprintf
(
stderr
,
"%s: ERROR Key %s not created. Value: %s, Data: %s
\n
"
,
getAppName
(),
currentKeyName
,
...
...
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