Nikolay Sivov wrote:
Andreas Rosenberg wrote:
if ( !lpcchSize ) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
SetLastError(ERROR_MORE_DATA);
}
}
}
else
SetLastError(ERROR_REGISTRY_CORRUPT);
}
else
SetLastError(ERROR_REGISTRY_CORRUPT);
return FALSE;
All these SetLastError are still potentially wrong since you don't check this error codes in your tests.
Sorry, but I disagree with your opinion.
Conformance tests should verify, if the function works like documented.
There is no documentation about the last error state for this function. So it would not helpful to add a test regarding this, it would be wrong doing so.
http://msdn.microsoft.com/en-us/library/bb762280(VS.85).aspx
Read the docs regarding GetLastError:
http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx
"The error codes returned by a function are not part of the Windows API specification and can vary by operating system or device driver. For this reason, we cannot provide the complete list of error codes that can be returned by each function."
So one could leave it out or do anything that supplies a meaningfull error code. If an application should report this error to a user it may be helpfull for locating the problem.
So I don't see a reason to change this implementation.