TRichMemo.SaveRichText Win64 ? lazarus / 31-LCL ---------------------------------------------------------------------- gillesfr14 · 2013-01-09 09:25 Hello, This code works fine with Win32 Code: [Select]//sRTF : String; procedure TForm1.Button1Click(Sender: TObject); var   ms1 : TStringStream; begin   try     ms1 := TStringStream.Create('');     RichMemo1.SaveRichText(ms1);     sRTF := ms1.DataString;     showmessage(sRTF);   except     showmessage('Oups');   end;   ms1.Free; end; procedure TForm1.Button2Click(Sender: TObject); var   ms2 : TStringStream; begin   try     ms2 := TStringStream.Create(sRTF);     RichMemo2.LoadRichText(ms2);   except     showmessage('Oups');   end;   ms2.Free; end; With Win64 : RichMemo1.SaveRichText(ms1) -->  Error RichEditWndProc RunError(216). The problem seems to be the call of SendMessage(RichEditWnd, EM_STREAMOUT, SF_RTF, LPARAM(@cbs) ); (line 373) from class function TRichEditManager.SaveRichText(RichEditWnd: Handle; ADst: TStream): Boolean; in file Win32RichMemoProc... Remark : the button's procedures don't work with gtk2/amd64. Help. Please. Thanks. Gilles ---------------------------------------------------------------------- gillesfr14 · 2013-01-09 10:31 Maybe here the Win64's solution : http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=21103. I am going to test. Regards. Gilles