调用dll出错,请人解答,在线等候 在Dll中调用COM相关内容(比如ClientDataset使用了Midas库),需要在使用前调用CoInitialize函数,结束后使用CoUninitializa函数。建议在程序单元的initialization和finalization段中执行这些初始化/解除COM调用设置的代码。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to:Miracle() 好像不是这个原因. 我调试过,只要不包含FR_DBSet, FR_View, FR_Class, FR_Desgn这些单元,程序退出就不会出现上述问题,各位有办法解决吗??如果不用这些单元的话,我要做的功能就出来了。 我调试过,只要不包含FR_DBSet, FR_View, FR_Class, FR_Desgn这些单元,程序退出就不会出现上述问题,各位有办法解决吗??如果不用这些单元的话,我要做的功能就出不来了。一字之差,谬之千里 {******************************************}{ }{ FastReport v2.4 }{ Progress dialog }{ }{ Copyright (c) 1998-2001 by Tzyganenko A. }{ }{******************************************}unit FR_progr;interface{$I FR.inc}uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, FR_Class, FR_Const;const CM_BeforeModal = WM_USER + 1;type TfrProgressForm = class(TForm) Button1: TButton; Label1: TLabel; Label2: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } FDoc: TfrReport; FOnBeforeModal: TNotifyEvent; procedure CMBeforeModal(var Message: TMessage); message CM_BeforeModal; procedure Localize; public { Public declarations } FirstCaption: String; property OnBeforeModal: TNotifyEvent read FOnBeforeModal write FOnBeforeModal; function Show_Modal(Doc: TfrReport): Word; end;implementationuses FR_Utils;{$R *.DFM}function TfrProgressForm.Show_Modal(Doc: TfrReport): Word;begin Localize; FDoc := Doc; Label2.Caption := ''; PostMessage(Handle, CM_BeforeModal, 0, 0); Result := ShowModal;end;procedure TfrProgressForm.Button1Click(Sender: TObject);begin FDoc.Terminated := True; ModalResult := mrCancel;end;procedure TfrProgressForm.CMBeforeModal(var Message: TMessage);begin if Assigned(FOnBeforeModal) then FOnBeforeModal(Self);end;procedure TfrProgressForm.Localize;begin Button1.Caption := frLoadStr(SCancel);end;end. 有感于 leemingsong(陨石) qq上答题,另外给分 读取其他进程启动参数? TQuickRep打印问题 adoquery2 can't perform this operation on a closet dataset ; 关于测试端口是否开放的问题■急 被小数点弄死了,怎么设也不行,请大家帮我一下呢? 如果只是从事数据库开发,有必要学数据结构吗 怎样清空文件内容? 急,有关Chart的显示 加"packed"的区别? 关于动态数组(array of Tlistview) 我快受不了了,D5下的程序在D6下用为什么会出现那么多的错误?释放也出错。请问这是为什么?谢谢! 请高手帮帮
一字之差,谬之千里
{ }
{ FastReport v2.4 }
{ Progress dialog }
{ }
{ Copyright (c) 1998-2001 by Tzyganenko A. }
{ }
{******************************************}unit FR_progr;interface{$I FR.inc}uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, FR_Class, FR_Const;const
CM_BeforeModal = WM_USER + 1;type
TfrProgressForm = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
FDoc: TfrReport;
FOnBeforeModal: TNotifyEvent;
procedure CMBeforeModal(var Message: TMessage); message CM_BeforeModal;
procedure Localize;
public
{ Public declarations }
FirstCaption: String;
property OnBeforeModal: TNotifyEvent read FOnBeforeModal write FOnBeforeModal;
function Show_Modal(Doc: TfrReport): Word;
end;
implementationuses FR_Utils;{$R *.DFM}function TfrProgressForm.Show_Modal(Doc: TfrReport): Word;
begin
Localize;
FDoc := Doc;
Label2.Caption := '';
PostMessage(Handle, CM_BeforeModal, 0, 0);
Result := ShowModal;
end;procedure TfrProgressForm.Button1Click(Sender: TObject);
begin
FDoc.Terminated := True;
ModalResult := mrCancel;
end;procedure TfrProgressForm.CMBeforeModal(var Message: TMessage);
begin
if Assigned(FOnBeforeModal) then FOnBeforeModal(Self);
end;procedure TfrProgressForm.Localize;
begin
Button1.Caption := frLoadStr(SCancel);
end;end.