T
tajingde
Unregistered / Unconfirmed
GUEST, unregistred user!
我在vb中引用的delphi中的dll 并写了回调函数 以便dll来调用 运行时调用成功并弹出“ok”对话框
但忽然程序就挂啦
delphi中的函数如下
Procedure SetOnFileArrive (const p_OnFileArrive :TOnFileArrive ); stdcall; external
'JustPipe.Dll';
TOnFileArrive =Procedure(Const p_CltAddr Char;
Const p_CltPort :integer;
Const p_LisnPort:integer;
Const p_FName Char;
Const p_DestDir Char) Of Object;
vb中我是这样写的
首先引用声明
Declare Function SetOnFileArrive Lib "JustPipe" (ByRef b As Long) As Boolean
然后调用
SetOnFileArrive(AddressOf gcb)‘gcb是我的回调函数
Dim fillname As String
Dim port As Integer
Dim lisnport As Integer
Dim filename As String
Dim desdir As String
Public Sub gcb(fillname, port, lisnport, filename, desdir)
MsgBox “ok”
End Sub
到底问题出在那儿 是我的vb回调函数不对吗 还是delphi的问题
但忽然程序就挂啦
delphi中的函数如下
Procedure SetOnFileArrive (const p_OnFileArrive :TOnFileArrive ); stdcall; external
'JustPipe.Dll';
TOnFileArrive =Procedure(Const p_CltAddr Char;
Const p_CltPort :integer;
Const p_LisnPort:integer;
Const p_FName Char;
Const p_DestDir Char) Of Object;
vb中我是这样写的
首先引用声明
Declare Function SetOnFileArrive Lib "JustPipe" (ByRef b As Long) As Boolean
然后调用
SetOnFileArrive(AddressOf gcb)‘gcb是我的回调函数
Dim fillname As String
Dim port As Integer
Dim lisnport As Integer
Dim filename As String
Dim desdir As String
Public Sub gcb(fillname, port, lisnport, filename, desdir)
MsgBox “ok”
End Sub
到底问题出在那儿 是我的vb回调函数不对吗 还是delphi的问题