把Delphi的代码转才BCB的(100)

  • 主题发起人 主题发起人 asnychen
  • 开始时间 开始时间
A

asnychen

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);var Strm, sm : TMemoryStream; a,b,len, e,f,g : integer; s1, s2:string;begin a:=1; b:=2; s1:='ceshi'; strm:=TMemoryStream.Create; sm:=TMemoryStream.Create; strm.Write(a, sizeof(a)); strm.Write(b, sizeof(b)); len:=length(s1); strm.Write(len, sizeof(len)); strm.Write(s1, len); sm.LoadFromStream(strm); sm.Seek(0, soFromBeginning); sm.Read(e, sizeof(a)); showmessage(IntToStr(e)); sm.Read(f, sizeof(b)); showmessage(IntToStr(f)); sm.Read(g, sizeof(len)); showmessage(IntToStr(g)); sm.Read(s2, g); showmessage(s2);end;怎么把这段测试代码转才BCB的,我写出来老是不对
 
后退
顶部