On Thu, April 10, 2008 01:11, Stephano wrote:
 .
 .
> 4- Windows SerOpen function (based on CreateFile) returns an
> INVALID_HANDLE_VALUE if the device could not be found. How to unify for
> both Linux & Windows? Is it safe to return instead -1 (as in the Linux
> case)?
 .
 .

If I read the Windows unit sources correctly, INVALID_HANDLE_VALUE = -1
too. However, I believe that you might consider returning UnusedHandle
constant defined in System unit for all the platforms (that's -1 for at
least most of them anyway, but I believe that it may be still better from
portability point of view to refer to it using this constant).

Tomas


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to