[DUG] Is it a bug in latest version of Delphi?
Karl Reynolds
kreynolds at chocfishsoft.co.nz
Tue Feb 16 15:29:27 NZDT 2010
On Tue, Feb 16, 2010 at 3:06 PM, Jolyon Smith <jsmith at deltics.co.nz> wrote:
> Win API returns -1 to indicate “an error”. Any error. Not a specific
> error. Certainly not specifically a list index error.
Pardon me for being pedantic, but while I agree with everything else
you said, I feel the need to reiterate that -1 isn't actually returned
to *indicate* an error (and you mentioned the conflict between an
error result and a valid result yourself at one point). It's just the
value returned when an error has occured. And yes, that means the VCL
code is wrong.
GetLastError... I won't say it again, promise. ;)
Cheers,
Karl
More information about the Delphi
mailing list