There is the following code (compiles under x32, Delphi XE7):
const varTypeMask = $0FFF; TExtData = packed record VExtType: LongWord; Reserved: LongWord; VPointer: Pointer; Dummy: LongWord; end; function ExtType(const Value: Variant): LongWord; begin if TVarData(Value).VType and varTypeMask <> 0 then Result := TVarData(Value).VType else Result := TExtData(Value).VExtType; end; When compiling for x64, we have an error:
[dcc64 Error]: E2089 Invalid typecast with a link to the string: Result := TExtData(Value).VExtType;
How to fix?