delphi 6.0下的动态库为project2.dll 定义如下:
------------------------------
library Project2;
uses
sharemem,
SysUtils,
Classes,ADODB;{$R *.res}
procedure exeselect(var adoquery1:tadoquery;constr,sqlstr:string;yn:boolean);stdcall;
begin
if constr<>'' then
adoquery1.ConnectionString :=constr; adoquery1.Active :=false;
adoquery1.SQL.Clear ;
adoquery1.SQL.Add(sqlstr);
if yn then
adoquery1.Active :=true
else
adoquery1.ExecSQL ;end;exports exeselect;begin
end.
-------------------------------------
delphi 2006 调用时,申明为:
procedure exeselect(adoquery1:tadoquery;constr,sqlstr:string;yn:boolean);stdcall;external 'project2.dll';--------------------------------------------------
当调用时就出现错误
值的一题的是,如果在delphi 2006环境下编写project2.dll 调用是就没有问题!!!为什么????
------------------------------
library Project2;
uses
sharemem,
SysUtils,
Classes,ADODB;{$R *.res}
procedure exeselect(var adoquery1:tadoquery;constr,sqlstr:string;yn:boolean);stdcall;
begin
if constr<>'' then
adoquery1.ConnectionString :=constr; adoquery1.Active :=false;
adoquery1.SQL.Clear ;
adoquery1.SQL.Add(sqlstr);
if yn then
adoquery1.Active :=true
else
adoquery1.ExecSQL ;end;exports exeselect;begin
end.
-------------------------------------
delphi 2006 调用时,申明为:
procedure exeselect(adoquery1:tadoquery;constr,sqlstr:string;yn:boolean);stdcall;external 'project2.dll';--------------------------------------------------
当调用时就出现错误
值的一题的是,如果在delphi 2006环境下编写project2.dll 调用是就没有问题!!!为什么????
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货