过程如下: 在vb6中建立一个ActiveX dll 工程 在类class的name属性改为datediff在类中添加如下代码:Public Function GetDiff(ByVal date1 As String, ByVal date2 As String) As IntegerGetDiff = datediff("n", date1, date2)
End Function
-------------------------------------------------------------------------------- 把这个dll编译成 datediff.dll 并放在D盘
---------------------------------------------------------------------------------在delphi 中 添加如下代码:
......
......
.....
....
var
Form1: TForm1;implementation{$R *.dfm}function GetDiff(date1:string;date2:string):integer;stdcall ; external 'd:\datediff.dll';
procedure TForm1.Button1Click(Sender: TObject);begin
label1.Caption:=inttostr( GetDiff('12:00','14:34'));
end;end.运行时出错,出错提示为无法定位程序输入点getdiff于动态链接库d:\datediff.dll上.
请问怎样解决????? 谢谢!!!!!!!
End Function
-------------------------------------------------------------------------------- 把这个dll编译成 datediff.dll 并放在D盘
---------------------------------------------------------------------------------在delphi 中 添加如下代码:
......
......
.....
....
var
Form1: TForm1;implementation{$R *.dfm}function GetDiff(date1:string;date2:string):integer;stdcall ; external 'd:\datediff.dll';
procedure TForm1.Button1Click(Sender: TObject);begin
label1.Caption:=inttostr( GetDiff('12:00','14:34'));
end;end.运行时出错,出错提示为无法定位程序输入点getdiff于动态链接库d:\datediff.dll上.
请问怎样解决????? 谢谢!!!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货