VB 调用delphi DLL
library dll;
uses
SysUtils,Classes;
{$R *.RES}
function TestDll(const a: string;t:Longint):Longint;stdcall;
begin
if ((a = '')or( t<5)) then Exit;
result:= Sqr(strtoint64(a) - t);
end;
exports
TestDll;
begin
end.
Private Declare Function TestDll Lib "dll.dll" (ByVal a As String, ByVal t As Long) As long
Private Sub Command1_Click()
Text3 = "34612795304820"'这个值是 5883264*5883264+11124得到的,所以不会出现其他的问题.
msgbox TestDll(Text3.Text, 11124
End Sub
'返回结果要求是 5883264
现在还是搞不定,一运算结果就错了,