On Wed Apr 24 17:51:45 2024 +0000, Elizabeth Figura wrote:
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.
I've modified the calls to SetupDiGetClassDescriptionA to pass all valid arguments. Changing `ls != ERROR_FILE_NOT_FOUND` to `ls == ERROR_INSUFFICIENT_BUFFER` or `ls == ERROR_MORE_DATA` in the implementation would cause the revised tests to fail.