While enabling a Delphi application to connect to its remote server using a TSocketConnection and not only a TDCOMConnection, I found ian ssue while I was returning Int64 data. It worked flawlessy via DCOM, but not via the easier-to-setup socket connection. What was happening? Well, in SConnect.pas there is this declaration:
[delphi]VariantSize: array[0..varLongWord] of Word = (...)[/delphi]
It is used in TDataBlockInterpreter.ReadVariant() to get the data size to be read from the stream the socket connection uses to pass data around: