This is an extract from OracleToDelphiData, found in Oracle.pas.

Code
    otInteger,
     otCursor,
       otCLOB,
       otBLOB,
      otBFile,
  otReference,
     otObject : begin
                  L := PLongInt(buf)^;
                  Result := L;
                end;

In case of otInteger this makes sense, assuming that the variable value is fixed 32-bit signed integer.

In case of the other types, the buffer is a pointer. The dereference operation will just take 4 bytes of whatever is at the memory location and interpret it as an integer. This value cannot be used to find where it came from.

Why are you doing this for all the object types?
This is an internal function that is not publicly documented.
© Allround Automations forums