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

2009-03-06 Thread Andreas Rosenberg
Vitaliy Margolen wrote: The error codes returned by a function are not part of the Windows API But they are. MS just made their obligation to document all of their craft that much easer and that much more undefined. According to this logic Error! is the only message you need for anything

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

2009-03-05 Thread Andreas Rosenberg
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

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

2009-03-05 Thread Andreas Rosenberg
Nikolay Sivov wrote: Andreas Rosenberg wrote: +    if ( !lpcchSize ) { +        SetLastError(ERROR_INVALID_PARAMETER); +        return FALSE; +                    SetLastError(ERROR_MORE_DATA); +                } +            } +        } +        else +            

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

2009-03-05 Thread Vitaliy Margolen
Andreas Rosenberg wrote: 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 But they are. MS just made their obligation to document all of their craft that much easer and that much more undefined.

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

2009-03-05 Thread Vitaliy Margolen
Andreas Rosenberg wrote: Conformance tests should verify, if the function works like documented. Not correct. If you look at lots of conformance tests they test things that are not documented. In some cases they test things that documentation is wrong about. Vitaliy.

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

2009-03-04 Thread Andreas Rosenberg
Nikolay Sivov wrote: Andreas Rosenberg wrote: +if ( !lpcchSize ) { +SetLastError(ERROR_INVALID_PARAMETER); +return FALSE; +SetLastError(ERROR_MORE_DATA); +} +} +} +else +

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

2009-03-04 Thread Ricardo Filipe
2009/3/4 Andreas Rosenberg andreas.rosenb...@apis.de 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 GetUserProfileDirectory.

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

2009-03-04 Thread Nikolay Sivov
Andreas Rosenberg wrote: Nikolay Sivov wrote: Andreas Rosenberg wrote: +if ( !lpcchSize ) { +SetLastError(ERROR_INVALID_PARAMETER); +return FALSE; +SetLastError(ERROR_MORE_DATA); +} +} +} +else +

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

2009-03-03 Thread Nikolay Sivov
Andreas Rosenberg wrote: +if ( !lpcchSize ) { +SetLastError(ERROR_INVALID_PARAMETER); +return FALSE; +SetLastError(ERROR_MORE_DATA); +} +} +} +else +SetLastError(ERROR_REGISTRY_CORRUPT); +} +