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
e4645d60
Commit
e4645d60
authored
May 01, 2017
by
Andrew Wesie
Committed by
Alexandre Julliard
May 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fix SetupDiGetDeviceRegistryProperty if property does not exist.
Signed-off-by:
Andrew Wesie
<
awesie@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
950b8a96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
devinst.c
dlls/setupapi/devinst.c
+6
-2
devinst.c
dlls/setupapi/tests/devinst.c
+8
-0
No files found.
dlls/setupapi/devinst.c
View file @
e4645d60
...
...
@@ -3125,7 +3125,9 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyA(
LONG
l
=
RegQueryValueExA
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameA
,
NULL
,
PropertyRegDataType
,
PropertyBuffer
,
&
size
);
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
if
(
l
==
ERROR_FILE_NOT_FOUND
)
SetLastError
(
ERROR_INVALID_DATA
);
else
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
if
(
!
l
)
ret
=
TRUE
;
...
...
@@ -3186,7 +3188,9 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
LONG
l
=
RegQueryValueExW
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameW
,
NULL
,
PropertyRegDataType
,
PropertyBuffer
,
&
size
);
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
if
(
l
==
ERROR_FILE_NOT_FOUND
)
SetLastError
(
ERROR_INVALID_DATA
);
else
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
if
(
!
l
)
ret
=
TRUE
;
...
...
dlls/setupapi/tests/devinst.c
View file @
e4645d60
...
...
@@ -1053,6 +1053,10 @@ static void testDeviceRegistryPropertyA(void)
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
ret
=
pSetupDiGetDeviceRegistryPropertyA
(
set
,
&
devInfo
,
SPDRP_HARDWAREID
,
NULL
,
NULL
,
0
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
pSetupDiDestroyDeviceInfoList
(
set
);
res
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
bogus
,
&
key
);
...
...
@@ -1158,6 +1162,10 @@ static void testDeviceRegistryPropertyW(void)
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
ret
=
pSetupDiGetDeviceRegistryPropertyW
(
set
,
&
devInfo
,
SPDRP_HARDWAREID
,
NULL
,
NULL
,
0
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
pSetupDiDestroyDeviceInfoList
(
set
);
res
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
bogus
,
&
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