Ignore:
Timestamp:
Aug 14, 2012, 10:31:30 AM (12 years ago)
Author:
chronos
Message:
  • Modified: PinConnection package now use for data parameters TListByte instead of TStream class contained in TemplateGenerics package. TStream have Position property which has no meaning for forwarding plain byte memory block. There is TBinarySerializer class used for serializing data instead of TStreamHelper class.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Additional/UBinarySerializer.pas

    r405 r407  
    187187  Buffer: array of Byte;
    188188begin
    189   if Count > (List.Count - StartIndex) then Count := (List.Count - StartIndex); // Limit max. stream size
    190   if Count > 0 then begin
    191     SetLength(Buffer, Count);
    192     List.GetBuffer(StartIndex, PByte(Buffer), Count);
     189//  if Count > (List.Count - StartIndex) then Count := (List.Count - StartIndex); // Limit max. stream size
     190  if Count > 0 then begin
     191    SetLength(Buffer, Count);
     192    List.GetBuffer(StartIndex, PByte(Buffer)^, Count);
    193193    Write(Pointer(Buffer)^, Count);
    194194  end;
     
    206206begin
    207207  FList.Count := 0;
     208  Position := 0;
    208209end;
    209210
Note: See TracChangeset for help on using the changeset viewer.