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
85861a49
Commit
85861a49
authored
Apr 17, 2008
by
Alexander Morozov
Committed by
Alexandre Julliard
Apr 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: SetupDiGetDeviceRegistryProperty should return…
setupapi: SetupDiGetDeviceRegistryProperty should return ERROR_INSUFFICIENT_BUFFER when buffer size is insufficient.
parent
68f12e32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
devinst.c
dlls/setupapi/devinst.c
+8
-8
devinst.c
dlls/setupapi/tests/devinst.c
+0
-2
No files found.
dlls/setupapi/devinst.c
View file @
85861a49
...
...
@@ -3118,14 +3118,14 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyA(
LONG
l
=
RegQueryValueExA
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameA
,
NULL
,
PropertyRegDataType
,
PropertyBuffer
,
&
size
);
if
(
RequiredSize
)
*
RequiredSize
=
size
;
if
(
!
PropertyBuffer
)
;
/* do nothing, ret is already FALSE, last error is already set */
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
if
(
!
l
)
ret
=
TRUE
;
else
SetLastError
(
l
);
if
(
RequiredSize
)
*
RequiredSize
=
size
;
}
return
ret
;
}
...
...
@@ -3174,14 +3174,14 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
LONG
l
=
RegQueryValueExW
(
devInfo
->
key
,
PropertyMap
[
Property
].
nameW
,
NULL
,
PropertyRegDataType
,
PropertyBuffer
,
&
size
);
if
(
RequiredSize
)
*
RequiredSize
=
size
;
if
(
!
PropertyBuffer
)
;
/* do nothing, ret is already FALSE, last error is already set */
if
(
l
==
ERROR_MORE_DATA
||
!
PropertyBufferSize
)
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
if
(
!
l
)
ret
=
TRUE
;
else
SetLastError
(
l
);
if
(
RequiredSize
)
*
RequiredSize
=
size
;
}
return
ret
;
}
...
...
dlls/setupapi/tests/devinst.c
View file @
85861a49
...
...
@@ -923,7 +923,6 @@ static void testDeviceRegistryPropertyA()
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiGetDeviceRegistryPropertyA
(
set
,
&
devInfo
,
SPDRP_FRIENDLYNAME
,
NULL
,
NULL
,
0
,
&
size
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Expected ERROR_INSUFFICIENT_BUFFER, got %08x
\n
"
,
GetLastError
());
ok
(
buflen
==
size
,
"Unexpected size: %d
\n
"
,
size
);
...
...
@@ -1018,7 +1017,6 @@ static void testDeviceRegistryPropertyW()
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiGetDeviceRegistryPropertyW
(
set
,
&
devInfo
,
SPDRP_FRIENDLYNAME
,
NULL
,
NULL
,
0
,
&
size
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Expected ERROR_INSUFFICIENT_BUFFER, got %08x
\n
"
,
GetLastError
());
ok
(
buflen
==
size
,
"Unexpected size: %d
\n
"
,
size
);
...
...
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