[fpc-pascal] Serial unit for Linux and Windows
Stephano
patspiper at yahoo.com
Fri Apr 11 22:12:44 CEST 2008
Tomas Hajny wrote:
> 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).
I cannot rely on what the actual value of INVALID_HANDLE_VALUE really is
as it could in theory change. But nevertheless your suggestion to return
the UnusedHandle constant, once I locate it :), is very logical.
More information about the fpc-pascal
mailing list