Possible Boolean serialization issue with TRODynamicRequest

Hello,

We observed a possible incompatibility between TRODynamicRequest and the generated server invoker in Delphi 13, Win32, using TROBinMessage.

When sending a Boolean parameter with value True:

  • In TRODynamicRequest, the Boolean value is 1.
  • TROStreamSerializer.WriteBoolean converts it to LongBool and writes -1 ($FFFFFFFF).
  • The generated server invoker reads the parameter using __Message.Read(…, TypeInfo(Boolean), …). The resulting Boolean contains $FF instead of $01.
    As a result, the debugger displays the parameter as True, but comparing to true evaluetes to false and the corresponding block is skipped.

Could you please check whether these serialization and deserialization paths are compatible?

Deserialization in file invk pas:

var
  l_aSynchronize: Boolean;
begin
  { ... }

  __Message.Read('aSynchronize', System.TypeInfo(Boolean), l_aSynchronize, []);
  //after this debuger shows l_aSynchronize = True

  if (l_aSynchronize = true) then // this evaluates to false
  begin
  
  end;

end;

Logged as bugs://D19745.

bugs://D19745 was closed as fixed.

Hi,

pls update uROStreamSerializer.pas as

procedure TROStreamSerializer.ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref; ArrayElementId: Integer = -1);
..
  else begin
    if anEnumTypeInfo = TypeInfo(Boolean) then  //added
      Boolean(Ref) := l_value <> 0              //added
    else                                        //added
      IntegerToEnumerated(l_value, anEnumTypeInfo, Ref);
  end;
end;

launch C:\Program Files (x86)\RemObjects Software\Build\install_DA.cmd (or install_RO.cmd) with admin rights for rebuilding .bpl and .dcu