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
e63f4fcf
Commit
e63f4fcf
authored
Jun 09, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Jun 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Fix two more tests on Windows 2000.
parent
02b05393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
26 deletions
+31
-26
devinst.c
dlls/setupapi/tests/devinst.c
+31
-26
No files found.
dlls/setupapi/tests/devinst.c
View file @
e63f4fcf
...
...
@@ -183,6 +183,33 @@ cleanup:
return
ret
;
}
static
void
clean_devclass_key
(
void
)
{
static
const
WCHAR
devclass
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'{'
,
'6'
,
'a'
,
'5'
,
'5'
,
'b'
,
'5'
,
'a'
,
'4'
,
'-'
,
'3'
,
'f'
,
'6'
,
'5'
,
'-'
,
'1'
,
'1'
,
'd'
,
'b'
,
'-'
,
'b'
,
'7'
,
'0'
,
'4'
,
'-'
,
'0'
,
'0'
,
'1'
,
'1'
,
'9'
,
'5'
,
'5'
,
'c'
,
'2'
,
'b'
,
'd'
,
'b'
,
'}'
,
0
};
HKEY
key
;
DWORD
subkeys
;
/* Check if we have subkeys as Windows 2000 doesn't delete
* the keys under the DeviceClasses key after a SetupDiDestroyDeviceInfoList.
*/
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
,
&
key
);
RegQueryInfoKey
(
key
,
NULL
,
NULL
,
NULL
,
&
subkeys
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
subkeys
>
0
)
{
trace
(
"We are most likely on Windows 2000
\n
"
);
devinst_RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
devclass
);
}
else
{
ok
(
!
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
),
"Couldn't delete deviceclass key
\n
"
);
}
}
static
void
test_SetupDiCreateDeviceInfoListEx
(
void
)
{
...
...
@@ -704,8 +731,7 @@ static void testCreateDeviceInterface(void)
/* Cleanup */
/* FIXME: On Wine we still have the bogus entry in Enum\Root and
* subkeys, as well as the deviceclass key with subkeys.
* Only do the RegDeleteKey (and RegDeleteTree on Windows 2000),
* once Wine is fixed.
* Only clean the deviceclass key once Wine if fixed.
*/
if
(
!
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
bogus
,
&
key
))
{
...
...
@@ -716,23 +742,7 @@ static void testCreateDeviceInterface(void)
}
else
{
DWORD
subkeys
;
/* Check if we have subkeys as Windows 2000 doesn't delete
* the keys under the DeviceClasses key
*/
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
,
&
key
);
RegQueryInfoKey
(
key
,
NULL
,
NULL
,
NULL
,
&
subkeys
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
subkeys
>
0
)
{
trace
(
"We are most likely on Windows 2000
\n
"
);
devinst_RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
devclass
);
}
else
{
ok
(
!
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
),
"Couldn't delete deviceclass key
\n
"
);
}
clean_devclass_key
();
}
}
}
...
...
@@ -865,8 +875,7 @@ static void testGetDeviceInterfaceDetail(void)
}
else
{
ok
(
!
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
),
"Couldn't delete deviceclass key
\n
"
);
clean_devclass_key
();
}
}
}
...
...
@@ -1125,11 +1134,7 @@ static void testRegisterAndGetDetail(void)
}
else
{
/* There should only be a class key entry, so a simple
* RegDeleteKey should work
*/
ok
(
!
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
devclass
),
"Couldn't delete classkey
\n
"
);
clean_devclass_key
();
}
}
...
...
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