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...
Modified: trunk/reactos/lib/setupapi/devinst.c
--- trunk/reactos/lib/setupapi/devinst.c 2005-10-25 15:29:42 UTC (rev 18771) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-25 15:43:06 UTC (rev 18772) @@ -2383,7 +2383,10 @@
*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);