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
3b77a8e4
Commit
3b77a8e4
authored
Sep 19, 2022
by
Sven Baars
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add some Software\Classes subkey tests.
parent
0ad6d688
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
194 additions
and
2 deletions
+194
-2
reg.c
dlls/ntdll/tests/reg.c
+194
-2
No files found.
dlls/ntdll/tests/reg.c
View file @
3b77a8e4
...
...
@@ -1472,7 +1472,7 @@ static void test_redirection(void)
char
buffer
[
1024
];
KEY_VALUE_PARTIAL_INFORMATION
*
info
=
(
KEY_VALUE_PARTIAL_INFORMATION
*
)
buffer
;
DWORD
dw
,
len
;
HANDLE
key
,
root32
,
root64
,
key32
,
key
64
;
HANDLE
key
,
key32
,
key64
,
root
,
root32
,
root
64
;
if
(
ptr_size
!=
64
)
{
...
...
@@ -1760,6 +1760,12 @@ static void test_redirection(void)
status
=
pNtCreateKey
(
&
key64
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
key64
;
status
=
pNtCreateKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
pNtDeleteKey
(
key
);
pNtClose
(
key
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
...
...
@@ -1819,10 +1825,16 @@ static void test_redirection(void)
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pNtDeleteKey
(
key64
);
pNtClose
(
key64
);
attr
.
RootDirectory
=
root32
;
status
=
pNtCreateKey
(
&
key32
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
dw
=
32
;
...
...
@@ -1847,6 +1859,186 @@ static void test_redirection(void)
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
32
,
"wrong value %lu
\n
"
,
dw
);
pNtClose
(
key64
);
pNtDeleteKey
(
key32
);
pNtClose
(
key32
);
pNtClose
(
root64
);
pNtClose
(
root32
);
pRtlInitUnicodeString
(
&
str
,
L"
\\
Registry
\\
Machine
\\
Software
\\
Classes"
);
attr
.
RootDirectory
=
0
;
status
=
pNtOpenKey
(
&
root64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
status
=
pNtOpenKey
(
&
root32
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
status
=
pNtOpenKey
(
&
root
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pRtlInitUnicodeString
(
&
str
,
L"Interface"
);
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key32
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pNtClose
(
root64
);
pNtClose
(
root32
);
pNtClose
(
root
);
root64
=
key64
;
root32
=
key32
;
root
=
key
;
pRtlInitUnicodeString
(
&
str
,
L"Wine"
);
attr
.
RootDirectory
=
root32
;
status
=
pNtCreateKey
(
&
key32
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pNtClose
(
key
);
pNtDeleteKey
(
key32
);
pNtClose
(
key32
);
attr
.
RootDirectory
=
root64
;
status
=
pNtCreateKey
(
&
key64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
32
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
pNtDeleteKey
(
key64
);
pNtClose
(
key64
);
pNtDeleteKey
(
root
);
pNtClose
(
root
);
attr
.
RootDirectory
=
root64
;
status
=
pNtCreateKey
(
&
key64
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
32
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
32
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
status
=
pNtCreateKey
(
&
key32
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
dw
=
32
;
status
=
pNtSetValueKey
(
key32
,
&
value_str
,
0
,
REG_DWORD
,
&
dw
,
sizeof
(
dw
)
);
ok
(
status
==
STATUS_SUCCESS
,
"NtSetValueKey failed: 0x%08lx
\n
"
,
status
);
pNtClose
(
key32
);
dw
=
64
;
status
=
pNtSetValueKey
(
key64
,
&
value_str
,
0
,
REG_DWORD
,
&
dw
,
sizeof
(
dw
)
);
ok
(
status
==
STATUS_SUCCESS
,
"NtSetValueKey failed: 0x%08lx
\n
"
,
status
);
pNtClose
(
key64
);
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key
,
&
value_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
64
,
"wrong value %lu
\n
"
,
dw
);
pNtClose
(
key
);
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key64
,
&
value_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
64
,
"wrong value %lu
\n
"
,
dw
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key32
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key32
,
&
value_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
ptr_size
,
"wrong value %lu
\n
"
,
dw
);
pNtDeleteKey
(
key32
);
pNtClose
(
key32
);
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
64
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
todo_wine_if
(
ptr_size
==
32
)
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
pNtClose
(
key
);
attr
.
RootDirectory
=
root32
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
status
=
pNtOpenKey
(
&
key
,
KEY_WOW64_32KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pNtDeleteKey
(
key64
);
pNtClose
(
key64
);
status
=
pNtCreateKey
(
&
key32
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
dw
=
32
;
status
=
pNtSetValueKey
(
key32
,
&
value_str
,
0
,
REG_DWORD
,
&
dw
,
sizeof
(
dw
)
);
ok
(
status
==
STATUS_SUCCESS
,
"NtSetValueKey failed: 0x%08lx
\n
"
,
status
);
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
32
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
{
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key
,
&
value_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
32
,
"wrong value %lu
\n
"
,
dw
);
pNtClose
(
key
);
}
attr
.
RootDirectory
=
root64
;
status
=
pNtOpenKey
(
&
key64
,
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
(
ptr_size
==
32
?
STATUS_OBJECT_NAME_NOT_FOUND
:
STATUS_SUCCESS
),
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
if
(
!
status
)
{
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key64
,
&
value_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08lx
\n
"
,
status
);
dw
=
*
(
DWORD
*
)
info
->
Data
;
ok
(
dw
==
32
,
"wrong value %lu
\n
"
,
dw
);
pNtClose
(
key64
);
}
pNtDeleteKey
(
key32
);
pNtClose
(
key32
);
...
...
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