dlls/userenv: fixed stubs GetUserProfileDirectoryW/A (2nd try)

Andreas Rosenberg andreas.rosenberg at apis.de
Wed Mar 4 11:00:37 CST 2009

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 you opinion. 

A conformance test should verify if an API call works like documented.

The MSDN documentation specifies nothing regarding error codes for


According to MSDN the error codes are not part of the API documentation:

"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."


I don't consider it helpful writing a conformance test, for something
that is not specified. One could simply omit the error codes, but if
this call should fail an app may log/present a more meaningfull error
message than without it. If the error codes should be different from
Windows, this is no problem either (..may vary by operating system..).

More information about the wine-devel mailing list