mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Return STATUS_INSUFFICIENT_BUFFER in SetupDiGetDeviceRegistryPropertyW if buffer for data was not specified.
This is not the same behaviour as RegQueryValueExW which returns a success in this case... svn path=/trunk/; revision=18772
This commit is contained in:
parent
9c0aa86aa7
commit
4ee6c762d2
1 changed files with 4 additions and 1 deletions
|
@ -2383,7 +2383,10 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
|
|||
*RequiredSize = BufferSize;
|
||||
switch(rc) {
|
||||
case ERROR_SUCCESS:
|
||||
ret = TRUE;
|
||||
if (PropertyBuffer != NULL || BufferSize == 0)
|
||||
ret = TRUE;
|
||||
else
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
break;
|
||||
case ERROR_MORE_DATA:
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
|
|
Loading…
Reference in a new issue