S
steve
Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi4写了如下的dll,在vb6中调用,如果不传参数,没有问题,一旦传参数就会提示非法操作,该dll导致无效页面错误.程序如下:
library testdll2;
function test(var x:integer):integer;stdcall;
begin
showmessage('The param is:'+inttostr(x));
test:=x+1;
end;
exports
test index 1 name 'test';
begin
end.
在vb中调用如下:
Private Declare Function test Lib "f:/hong/testdll2.dll"
(ByVal x As Integer) As Integer
Private Sub Command1_Click()
Dim x As Integer
Dim y As Integer
y = Val(Text1.Text)
MsgBox "The param in vb is:" + Str
x = test
MsgBox "The feedback is:" + Str(x)
Text1.Text = Str(x)
End Sub
希望各位大虾能尽快帮我,很急!
library testdll2;
function test(var x:integer):integer;stdcall;
begin
showmessage('The param is:'+inttostr(x));
test:=x+1;
end;
exports
test index 1 name 'test';
begin
end.
在vb中调用如下:
Private Declare Function test Lib "f:/hong/testdll2.dll"
(ByVal x As Integer) As Integer
Private Sub Command1_Click()
Dim x As Integer
Dim y As Integer
y = Val(Text1.Text)
MsgBox "The param in vb is:" + Str
x = test
MsgBox "The feedback is:" + Str(x)
Text1.Text = Str(x)
End Sub
希望各位大虾能尽快帮我,很急!