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
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
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+ if ( !lpcchSize ) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ SetLastError(ERROR_MORE_DATA);
+ }
+ }
+ }
+ else
+
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.
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.
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+
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.
Andreas Rosenberg wrote:
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+SetLastError(ERROR_REGISTRY_CORRUPT);
+}
+