Internet Direct (Indy) Version 9.0.2 Beta
TIdCardinalBytes
Provides alternate representations of the bytes in a Cardinal value.

TIdCardinalBytes = record
  case Integer of
    0: (Byte1: Byte;
        Byte2: Byte;
        Byte3: Byte;
        Byte4: Byte;);
    1: (Whole: Cardinal;);
    2: (CharArray: array[0..3] of Char););
  end;
Description
TIdCardinalBytes is a record type that provides alternate representations of the bytes in a Cardinal value. TIdCardinalBytes is the structure used to assist in converting values in TIdDNSResolver.DecodeReplyPacket and in Indy coder methods like TIdDecoder4to3.DecodeToStream and TIdEncoder3to4.Encode.

Byte1, Byte2, Byte3, and Byte4 are Byte members that represent the individual 8-bit values in the Cardinal data type.

Whole is a Cardinal member that represents the 32-bit value for the data type.

CharArray is an Array member that contains the representation of each Byte as an AnsiChar value. CharArray values can be accessed by adding the value to a string such as Str := Str + Rec.CharArray or by an index in the range 0 to 3, where each value corresponds the following Byte value: