Alexander Morozov : setupapi: SetupDiGetDeviceRegistryProperty should return ERROR_INVALID_DATA when buffer size is not 0 but buffer is NULL .