On June 10, 2010 6:12:42 PM, Tomas Hajny wrote:
>OK, this is a slightly different story then. Win32 API function FindFirst >(and thus also the Delphi function FindFirst provided in SysUtils) returns >the "search handle" (positive value) in case of a success and -1 in case >of an error. The implementation for OS/2 and DOS passes the error >information directly (rather than relying on a subsequent call to >GetLastError, which is again a Win32 API call and not directly >transferable, or using GetLastOSError and relying on the fact that no >other OS API has been used by the RTL in the meantime), but it needs to >use a negative value in order to differentiate from possitive values >meaning success. The same logic is then in turn also used for FindNext >(although that one does never return search handles even on Windows). Thanks Tomas, that explanation even makes me understand this FPC decision better. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal