DLL中使用的Fastreport能不能直接打印???

wzgdyn 2009-04-25 04:22:18
我的程序打印直接写在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;

...全文
84 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wzgdyn 2009-05-08
  • 打赏
  • 举报
回复
这么久了都没人回答
wzgdyn 2009-04-29
  • 打赏
  • 举报
回复
怎么没人啊 ?????

16,749

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧