RTC Forums

Subscription => Support => Topic started by: xalion on February 25, 2013, 09:07:33 AM



Title: TRtcFileStream bug?
Post by: xalion on February 25, 2013, 09:07:33 AM
I use TRtcFileStream,
but I foung function TRtcFileStream.ReadEx(Size: int64): RtcByteArray can't read anything.
and I checked the code :
Code:
function TRtcFileStream.ReadEx(Size: int64): RtcByteArray;
  var
    sRead:int64;
  begin
  if f=RTC_INVALID_FILE_HDL then
    raise ERtcInfo.Create('File not open.')
  else
    begin
    if Size<0 then
      begin
      Size:=FileSeek(f,int64(0),2)-L;
      fileseek(f,L,0);  ------------------------------------> this line added
      end;
    SetLength(Result,Size);
    sRead:=FileRead(f,Result[0],Size);
    Inc(L,sRead);
    if sRead<Size then
      SetLength(Result,sRead);
    end;
  end;

I added the line, it now works fine.


Title: Re: TRtcFileStream bug?
Post by: D.Tkalcec (RTC) on February 26, 2013, 02:13:15 PM
Thank you for reporting this problem.
RealThinClient SDK v6.08 has now been released to fix this issue.

Best Regards,
Danijel Tkalcec