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
411bab07
Commit
411bab07
authored
Oct 28, 2001
by
Guy L. Albertelli
Committed by
Alexandre Julliard
Oct 28, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement SHRegGetBoolUSValue{A|W}.
parent
7c2df090
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
4 deletions
+88
-4
reg.c
dlls/shlwapi/reg.c
+88
-4
No files found.
dlls/shlwapi/reg.c
View file @
411bab07
...
@@ -375,8 +375,50 @@ BOOL WINAPI SHRegGetBoolUSValueA(
...
@@ -375,8 +375,50 @@ BOOL WINAPI SHRegGetBoolUSValueA(
BOOL
fIgnoreHKCU
,
BOOL
fIgnoreHKCU
,
BOOL
fDefault
)
BOOL
fDefault
)
{
{
FIXME
(
"%s %s
\n
"
,
pszSubKey
,
pszValue
);
LONG
retvalue
;
return
fDefault
;
DWORD
type
,
datalen
,
work
;
BOOL
ret
=
fDefault
;
CHAR
data
[
10
];
TRACE
(
"key '%s', value '%s', %s
\n
"
,
debugstr_a
(
pszSubKey
),
debugstr_a
(
pszValue
),
(
fIgnoreHKCU
)
?
"Ignoring HKCU"
:
"Trys HKCU then HKLM"
);
datalen
=
sizeof
(
data
)
-
1
;
if
(
!
(
retvalue
=
SHRegGetUSValueA
(
pszSubKey
,
pszValue
,
&
type
,
data
,
&
datalen
,
fIgnoreHKCU
,
0
,
0
)))
{
/* process returned data via type into bool */
switch
(
type
)
{
case
REG_SZ
:
data
[
9
]
=
'\0'
;
/* set end of string */
if
(
lstrcmpiA
(
data
,
"YES"
)
==
0
)
ret
=
TRUE
;
if
(
lstrcmpiA
(
data
,
"TRUE"
)
==
0
)
ret
=
TRUE
;
if
(
lstrcmpiA
(
data
,
"NO"
)
==
0
)
ret
=
FALSE
;
if
(
lstrcmpiA
(
data
,
"FALSE"
)
==
0
)
ret
=
FALSE
;
break
;
case
REG_DWORD
:
work
=
*
(
LPDWORD
)
data
;
ret
=
(
work
!=
0
);
break
;
case
REG_BINARY
:
if
(
datalen
==
1
)
{
ret
=
(
data
[
0
]
!=
'\0'
);
break
;
}
default:
FIXME
(
"Unsupported registry data type %ld
\n
"
,
type
);
ret
=
FALSE
;
}
TRACE
(
"got value (type=%ld), returing <%s>
\n
"
,
type
,
(
ret
)
?
"TRUE"
:
"FALSE"
);
}
else
{
ret
=
fDefault
;
TRACE
(
"returning default data <%s>
\n
"
,
(
ret
)
?
"TRUE"
:
"FALSE"
);
}
return
ret
;
}
}
/*************************************************************************
/*************************************************************************
...
@@ -388,8 +430,50 @@ BOOL WINAPI SHRegGetBoolUSValueW(
...
@@ -388,8 +430,50 @@ BOOL WINAPI SHRegGetBoolUSValueW(
BOOL
fIgnoreHKCU
,
BOOL
fIgnoreHKCU
,
BOOL
fDefault
)
BOOL
fDefault
)
{
{
FIXME
(
"%s %s
\n
"
,
debugstr_w
(
pszSubKey
),
debugstr_w
(
pszValue
));
LONG
retvalue
;
return
fDefault
;
DWORD
type
,
datalen
,
work
;
BOOL
ret
=
fDefault
;
WCHAR
data
[
10
];
TRACE
(
"key '%s', value '%s', %s
\n
"
,
debugstr_w
(
pszSubKey
),
debugstr_w
(
pszValue
),
(
fIgnoreHKCU
)
?
"Ignoring HKCU"
:
"Trys HKCU then HKLM"
);
datalen
=
(
sizeof
(
data
)
-
1
)
*
sizeof
(
WCHAR
);
if
(
!
(
retvalue
=
SHRegGetUSValueW
(
pszSubKey
,
pszValue
,
&
type
,
data
,
&
datalen
,
fIgnoreHKCU
,
0
,
0
)))
{
/* process returned data via type into bool */
switch
(
type
)
{
case
REG_SZ
:
data
[
9
]
=
L'\0'
;
/* set end of string */
if
(
lstrcmpiW
(
data
,
L"YES"
)
==
0
)
ret
=
TRUE
;
if
(
lstrcmpiW
(
data
,
L"TRUE"
)
==
0
)
ret
=
TRUE
;
if
(
lstrcmpiW
(
data
,
L"NO"
)
==
0
)
ret
=
FALSE
;
if
(
lstrcmpiW
(
data
,
L"FALSE"
)
==
0
)
ret
=
FALSE
;
break
;
case
REG_DWORD
:
work
=
*
(
LPDWORD
)
data
;
ret
=
(
work
!=
0
);
break
;
case
REG_BINARY
:
if
(
datalen
==
1
)
{
ret
=
(
data
[
0
]
!=
L'\0'
);
break
;
}
default:
FIXME
(
"Unsupported registry data type %ld
\n
"
,
type
);
ret
=
FALSE
;
}
TRACE
(
"got value (type=%ld), returing <%s>
\n
"
,
type
,
(
ret
)
?
"TRUE"
:
"FALSE"
);
}
else
{
ret
=
fDefault
;
TRACE
(
"returning default data <%s>
\n
"
,
(
ret
)
?
"TRUE"
:
"FALSE"
);
}
return
ret
;
}
}
/*************************************************************************
/*************************************************************************
...
...
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