[fpc-devel] Some more THandle problems

Florian Klämpfl florian at freepascal.org
Sat Nov 20 16:26:10 CET 2010


Am 20.11.2010 14:30, schrieb Marco van de Voort:
> In our previous episode, Sergei Gorelkin said:
>>> 2. THandleStream has a field FHandle which is defined as Integer. Now 
>>> this handle is filled either by the constructor which takes an Integer 
>>> as well or by e.g. TFileStream which gets its handle from 
>>> FileOpen/FileCreate. Those return a THandle and you might guess what 
>>> happens if a value >= 2^32 is returned. ^^
>>>
>> 1 and 2 fixed in rev. 16383
> 
> Is it wise to recycle thandle for that? 


At least a lot of code assumes that. See e.g. FileRead and friends.

> Windows has a system where all
> handles are of the same type, but other systems might not. 

As soon as we find such a system, we can still introduce a TFileHandle.



More information about the fpc-devel mailing list