Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
7dbce65b
Commit
7dbce65b
authored
23 years ago
by
Michael Cardenas
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed registry handling in RegOpenKeyExA to behave like windows95
when winver==win95.
parent
8c45390a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/advapi32/registry.c
+14
-8
14 additions, 8 deletions
dlls/advapi32/registry.c
with
14 additions
and
8 deletions
dlls/advapi32/registry.c
+
14
−
8
View file @
7dbce65b
...
...
@@ -42,11 +42,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg);
/* check if value type needs string conversion (Ansi<->Unicode) */
static
inline
int
is_string
(
DWORD
type
)
inline
static
int
is_string
(
DWORD
type
)
{
return
(
type
==
REG_SZ
)
||
(
type
==
REG_EXPAND_SZ
)
||
(
type
==
REG_MULTI_SZ
);
}
/* check if current version is NT or Win95 */
inline
static
int
is_version_nt
(
void
)
{
return
!
(
GetVersion
()
&
0x80000000
);
}
/******************************************************************************
* RegCreateKeyExW [ADVAPI32.@]
...
...
@@ -102,7 +107,8 @@ DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR clas
NTSTATUS
status
;
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
access
&
KEY_ALL_ACCESS
)
||
(
access
&
~
KEY_ALL_ACCESS
))
return
ERROR_ACCESS_DENIED
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
else
if
(
!
(
access
&
KEY_ALL_ACCESS
)
||
(
access
&
~
KEY_ALL_ACCESS
))
return
ERROR_ACCESS_DENIED
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
...
...
@@ -195,6 +201,8 @@ DWORD WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM acces
STRING
nameA
;
NTSTATUS
status
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
attr
.
ObjectName
=
&
NtCurrentTeb
()
->
StaticUnicodeString
;
...
...
@@ -445,8 +453,7 @@ DWORD WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWO
TRACE
(
"(0x%x,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)
\n
"
,
hkey
,
class
,
class_len
?
*
class_len
:
0
,
reserved
,
subkeys
,
max_subkey
,
values
,
max_value
,
max_data
,
security
,
modif
);
if
(
class
&&
!
class_len
&&
!
(
GetVersion
()
&
0x80000000
/*NT*/
))
return
ERROR_INVALID_PARAMETER
;
if
(
class
&&
!
class_len
&&
is_version_nt
())
return
ERROR_INVALID_PARAMETER
;
status
=
NtQueryKey
(
hkey
,
KeyFullInformation
,
buffer
,
sizeof
(
buffer
),
&
total_size
);
if
(
status
&&
status
!=
STATUS_BUFFER_OVERFLOW
)
goto
done
;
...
...
@@ -508,8 +515,7 @@ DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWOR
TRACE
(
"(0x%x,%p,%ld,%p,%p,%p,%p,%p,%p,%p,%p)
\n
"
,
hkey
,
class
,
class_len
?
*
class_len
:
0
,
reserved
,
subkeys
,
max_subkey
,
values
,
max_value
,
max_data
,
security
,
modif
);
if
(
class
&&
!
class_len
&&
!
(
GetVersion
()
&
0x80000000
/*NT*/
))
return
ERROR_INVALID_PARAMETER
;
if
(
class
&&
!
class_len
&&
is_version_nt
())
return
ERROR_INVALID_PARAMETER
;
status
=
NtQueryKey
(
hkey
,
KeyFullInformation
,
buffer
,
sizeof
(
buffer
),
&
total_size
);
if
(
status
&&
status
!=
STATUS_BUFFER_OVERFLOW
)
goto
done
;
...
...
@@ -647,7 +653,7 @@ DWORD WINAPI RegSetValueExW( HKEY hkey, LPCWSTR name, DWORD reserved,
{
UNICODE_STRING
nameW
;
if
(
GetV
ersion
()
&
0x80000000
)
/* win95 */
if
(
!
is_v
ersion
_nt
()
)
/* win95 */
{
if
(
type
==
REG_SZ
)
count
=
(
strlenW
(
(
WCHAR
*
)
data
)
+
1
)
*
sizeof
(
WCHAR
);
}
...
...
@@ -674,7 +680,7 @@ DWORD WINAPI RegSetValueExA( HKEY hkey, LPCSTR name, DWORD reserved, DWORD type,
WCHAR
*
dataW
=
NULL
;
NTSTATUS
status
;
if
(
GetV
ersion
()
&
0x80000000
)
/* win95 */
if
(
!
is_v
ersion
_nt
()
)
/* win95 */
{
if
(
type
==
REG_SZ
)
count
=
strlen
(
data
)
+
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment