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
9bbcb857
Commit
9bbcb857
authored
Sep 09, 2006
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Sep 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fixed returns values and added a test for SetupDiOpenClassRegKeyExW.
parent
14b5e014
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
devinst.c
dlls/setupapi/devinst.c
+2
-2
devinst.c
dlls/setupapi/tests/devinst.c
+23
-1
No files found.
dlls/setupapi/devinst.c
View file @
9bbcb857
...
...
@@ -1453,7 +1453,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW(
if
(
UuidToStringW
((
UUID
*
)
ClassGuid
,
&
lpGuidString
)
!=
RPC_S_OK
)
{
RegCloseKey
(
hClassesKey
);
return
FALS
E
;
return
INVALID_HANDLE_VALU
E
;
}
if
(
RegOpenKeyExW
(
hClassesKey
,
...
...
@@ -1464,7 +1464,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW(
{
RpcStringFreeW
(
&
lpGuidString
);
RegCloseKey
(
hClassesKey
);
return
FALS
E
;
return
INVALID_HANDLE_VALU
E
;
}
RpcStringFreeW
(
&
lpGuidString
);
...
...
dlls/setupapi/tests/devinst.c
View file @
9bbcb857
...
...
@@ -26,6 +26,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "guiddef.h"
#include "setupapi.h"
#include "wine/test.h"
...
...
@@ -34,6 +35,7 @@
static
HMODULE
hSetupAPI
;
static
HDEVINFO
(
WINAPI
*
pSetupDiCreateDeviceInfoListExW
)(
GUID
*
,
HWND
,
PCWSTR
,
PVOID
);
static
BOOL
(
WINAPI
*
pSetupDiDestroyDeviceInfoList
)(
HDEVINFO
);
static
HKEY
(
WINAPI
*
pSetupDiOpenClassRegKeyExA
)(
GUID
*
,
REGSAM
,
DWORD
,
PCSTR
,
PVOID
);
static
void
init_function_pointers
(
void
)
{
...
...
@@ -43,6 +45,7 @@ static void init_function_pointers(void)
{
pSetupDiCreateDeviceInfoListExW
=
(
void
*
)
GetProcAddress
(
hSetupAPI
,
"SetupDiCreateDeviceInfoListExW"
);
pSetupDiDestroyDeviceInfoList
=
(
void
*
)
GetProcAddress
(
hSetupAPI
,
"SetupDiDestroyDeviceInfoList"
);
pSetupDiOpenClassRegKeyExA
=
(
void
*
)
GetProcAddress
(
hSetupAPI
,
"SetupDiOpenClassRegKeyExA"
);
}
}
...
...
@@ -79,6 +82,20 @@ static void test_SetupDiCreateDeviceInfoListEx(void)
ok
(
ret
,
"SetupDiDestroyDeviceInfoList failed : %ld
\n
"
,
error
);
}
static
void
test_SetupDiOpenClassRegKeyExA
(
void
)
{
/* This is a unique guid for testing purposes */
GUID
guid
=
{
0x6a55b5a4
,
0x3f65
,
0x11db
,
{
0xb7
,
0x04
,
0x00
,
0x11
,
0x95
,
0x5c
,
0x2b
,
0xdb
}};
HKEY
hkey
;
/* Check return value for non-existent key */
hkey
=
SetupDiOpenClassRegKeyExA
(
&
guid
,
KEY_ALL_ACCESS
,
DIOCR_INSTALLER
,
NULL
,
NULL
);
ok
(
hkey
==
INVALID_HANDLE_VALUE
,
"returned %p (expected INVALID_HANDLE_VALUE)
\n
"
,
hkey
);
}
START_TEST
(
devinst
)
{
init_function_pointers
();
...
...
@@ -88,5 +105,10 @@ START_TEST(devinst)
if
(
pSetupDiCreateDeviceInfoListExW
&&
pSetupDiDestroyDeviceInfoList
)
test_SetupDiCreateDeviceInfoListEx
();
else
trace
(
"Needed calls not all available, skipping tests.
\n
"
);
trace
(
"Needed calls for SetupDiCreateDeviceInfoListEx not all available, skipping test.
\n
"
);
if
(
pSetupDiOpenClassRegKeyExA
)
test_SetupDiOpenClassRegKeyExA
();
else
trace
(
"Needed call for SetupDiOpenClassRegKeyExA not available, skipping test.
\n
"
);
}
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