Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: New LargeStream problem
| Subject: | Re: New LargeStream problem |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 24 May 2006 11:20:36 |
"RGreen" <rgreen@nospam.kemi.umu.se> wrote in message
news:4474438b$1@newsgroups.borland.com...
> ADataChannel.IOHandler:= TIdIOHandlerStack(FStackHandler);
Why are you doing that? The DataChannel already has an IOHandler assigned
to it before entering the event. You should be setting the LargeStream
property on the existing IOHandler instead, ie:
procedure TFTP.OnDataChannelCreate(ASender: TObject; ADataChannel:
TIdTCPConnection);
begin
ADataChannel.IOHandler.LargeStream := True;
end;
> All well. The transfer begins and it goes well up to 2Gb. Then the
> program exploits with a Range Check Error.
Indy uses Int64 internally. Only the OnWork event handlers are still
Integer. Changing them to Int64 would break existing user code, though. If
you are ok with that, then you can modify IdComponent.pas to use Int64
instead of Integer for the events, and then recompile Indy.
Gambit