Invalid typecast: convert record to tobject on 64-bit platform

Viewed 1482

it works on 32-bit platform.but not 64-bit here is the exzample

  TVerbInfo = packed record
    Verb: Smallint;
    Flags: Word;
  end;

var
  VerbInfo: TVerbInfo;
  strList : TStringList;
  verb : Smallint;
  flags : Word;
begin
  strList := TStringList.create();
  .....
  verbInfo.verb := verb;
  verbInfo.flags := flags;
  strList.addObject('verb1',TObject(VerbInfo));  //invalid typecast happened here
end;

can anyone help me? thank you very much

3 Answers
Related