T
the3rd
Unregistered / Unconfirmed
GUEST, unregistred user!
如题:Web Service(ISAPI)中调用一个进程内COM(DLL),多次调用后发生Error Loading MIDAS.DLL错误
进程内的COM中采用ADOQuery+DataSetProvider+ClientDataSet的方式,如果我所有的数据
库操作都集中使用ClientDataSet的CommandText来实现,那么在调用大概几千次以后,
就会出现上面提到的错误,一旦出现该错误就会造成后来的调用全部出现该错误,这时如果
卸载IIS中的Cache,就会恢复正常,但调用多次后问题依然出现。
我想获得Load Dll的错误代码,但需要更改Delphi自带的源程序比较麻烦,哪位朋友知道一些
或者遇到过这方面的问题,望不吝赐教!
另外我在Borland的新闻组上还提出了如下问题,但无人回答:
Why win2k+D7 need interchange the order of ISAPIApp and ISAPIThreadPool, but
XP+D7do
n't need.
I created a web service project(isapi) on XP Pro+Delphi7 Ent. It run very well.
But it run first time ok and next time error, after I build it on win2k pro+Delphi7 Ent.
Someone said it should interchange the order of ISAPIApp and ISAPIThreadPool in
the project unit. Ido
, and it run well. But I want to know the different between win2k and XP.
Why? Please told me. Thanks.
标题所提的问题也在Borland新闻组上提过,也无人回应,一并附在下面:
Why "Error loading MIDAS.DLL", when call a in-process COM in ISAPI DLL.
I write a in-process COM, which code is:
type
TTstDBCom = class(TRemoteDataModule, ITstDBCom)
Qry: TADOQuery;
DSP: TDataSetProvider;
CDS: TClientDataSet;
protected
function GetJobDetail(AJobID: Integer): WideString;
safecall;
// return
XMLData of TClientDataSet
end;
function TTstDBCom.GetJobDetail(AJobID: Integer): WideString;
begin
try
with CDSdo
//CDS: TClientDataSet
begin
Close;
CommandText := 'Select * From Jobs where job_id='+IntToStr(AJobID);
Open;
Result := XMLData;
Close;
end;
Except
On E: Exceptiondo
begin
WriteLog(E.Message);
end;
end;
end;
And write a ISAPI DLL to call this COM, which code is:
//Interface
INetDBCOM = interface(IInvokable)
['{408C67F4-8500-484E-BCD0-5B77012BC7E6}']
function GetJobDetail(AJobID: Integer): WideString;
safecall;
end;
//type
TNetDBCOM = class(TInvokableClass, INetDBCOM)
private
function DBCOM: ITstDBCom;
//To CoCreate ITstDBCom
public
function GetJobDetail(AJobID: Integer): WideString;
safecall;
// my test
function. return XMLData
end;
//implementation
function TNetDBCOM.DBCOM: ITstDBCom;
begin
result := CoTstDBCom.Create;
end;
function TNetDBCOM.GetJobDetail(AJobID: Integer): WideString;
begin
result := DBCom.GetJobDetail(AJobID)
end;
When call this ISAPI DLL with SOAP, it's OK. But if I call continually more
than a hundred thousand,
I will get an error message, "Error loading MIDAS.DLL", in log file. If I
use this structure
in complex application, it will come more quickly.
I notice that the DLLhost.exe in the memory be more and more large during
the calling.
I find this on Win2k Pro + D7 Ent. I can not find this on WinXP Pro + D7
Ent.
Is this a bug of IIS or Delphi7?
Thanks a lot.
进程内的COM中采用ADOQuery+DataSetProvider+ClientDataSet的方式,如果我所有的数据
库操作都集中使用ClientDataSet的CommandText来实现,那么在调用大概几千次以后,
就会出现上面提到的错误,一旦出现该错误就会造成后来的调用全部出现该错误,这时如果
卸载IIS中的Cache,就会恢复正常,但调用多次后问题依然出现。
我想获得Load Dll的错误代码,但需要更改Delphi自带的源程序比较麻烦,哪位朋友知道一些
或者遇到过这方面的问题,望不吝赐教!
另外我在Borland的新闻组上还提出了如下问题,但无人回答:
Why win2k+D7 need interchange the order of ISAPIApp and ISAPIThreadPool, but
XP+D7do
n't need.
I created a web service project(isapi) on XP Pro+Delphi7 Ent. It run very well.
But it run first time ok and next time error, after I build it on win2k pro+Delphi7 Ent.
Someone said it should interchange the order of ISAPIApp and ISAPIThreadPool in
the project unit. Ido
, and it run well. But I want to know the different between win2k and XP.
Why? Please told me. Thanks.
标题所提的问题也在Borland新闻组上提过,也无人回应,一并附在下面:
Why "Error loading MIDAS.DLL", when call a in-process COM in ISAPI DLL.
I write a in-process COM, which code is:
type
TTstDBCom = class(TRemoteDataModule, ITstDBCom)
Qry: TADOQuery;
DSP: TDataSetProvider;
CDS: TClientDataSet;
protected
function GetJobDetail(AJobID: Integer): WideString;
safecall;
// return
XMLData of TClientDataSet
end;
function TTstDBCom.GetJobDetail(AJobID: Integer): WideString;
begin
try
with CDSdo
//CDS: TClientDataSet
begin
Close;
CommandText := 'Select * From Jobs where job_id='+IntToStr(AJobID);
Open;
Result := XMLData;
Close;
end;
Except
On E: Exceptiondo
begin
WriteLog(E.Message);
end;
end;
end;
And write a ISAPI DLL to call this COM, which code is:
//Interface
INetDBCOM = interface(IInvokable)
['{408C67F4-8500-484E-BCD0-5B77012BC7E6}']
function GetJobDetail(AJobID: Integer): WideString;
safecall;
end;
//type
TNetDBCOM = class(TInvokableClass, INetDBCOM)
private
function DBCOM: ITstDBCom;
//To CoCreate ITstDBCom
public
function GetJobDetail(AJobID: Integer): WideString;
safecall;
// my test
function. return XMLData
end;
//implementation
function TNetDBCOM.DBCOM: ITstDBCom;
begin
result := CoTstDBCom.Create;
end;
function TNetDBCOM.GetJobDetail(AJobID: Integer): WideString;
begin
result := DBCom.GetJobDetail(AJobID)
end;
When call this ISAPI DLL with SOAP, it's OK. But if I call continually more
than a hundred thousand,
I will get an error message, "Error loading MIDAS.DLL", in log file. If I
use this structure
in complex application, it will come more quickly.
I notice that the DLLhost.exe in the memory be more and more large during
the calling.
I find this on Win2k Pro + D7 Ent. I can not find this on WinXP Pro + D7
Ent.
Is this a bug of IIS or Delphi7?
Thanks a lot.