What do you mean? If RegQueryValueEx runs out of space, it returns ERROR_MORE_DATA. But if the class is installed, SetupDiGetClassDescription writes to RequiredSize whether the buffer is sufficient or not.
Well, we should be translating ERROR_MORE_DATA to ERROR_INSUFFICIENT_BUFFER apparently, but what I mean is, write "ls == ERROR_INSUFFICIENT_BUFFER" instead of "ls != ERROR_FILE_NOT_FOUND".
Are you just saying that you want to see a test where SetupDiGetClassDescription succeeds and writes to both ClassDescription and RequiredSize?
That would certainly be nice to have, although I guess I wouldn't consider it necessary for the patch.