我的程序打印直接写在DLL中,在DLL里面实现Fastreport打印页的预览,现在预览都可以出来了,但是如果写上打印,DLL执行就会报错:"list index out of bounds(0)",还有 "Access violation at address 004032A6 in module 'tysee.exe' "delphi中的调用DLL:
           try
            print_handle:=loadlibrary('dll\typrint.dll');
            if print_handle<>0 then begin
              @print_ty:=GetProcAddress(print_handle,'print_ty')
              print_ty(trim(edit3.text),dm,lb,trim(edit2.text),bz);
            end;
           finally
              freelibrary(print_handle);
           end;DLL中的打印代码:    try
       frm1.frReport1.PrepareReport;
      frm1.frReport1.ShowPreparedReport;
      //frm1.frReport1.PrintPreparedReportDlg;///--这句打印的 只要加上就会报错
    finally
      frm1.frReport1.free;
    end;