在程序中用
Public Declare Function SendTo Lib "FV.dll" () As Long
来调用dll (dll和程序放在同一目录)dll中函数
Public Function SendTo()
......
......
......
End Function
这样应该没错啊,怎么会出错呢,大家说说,帮帮忙啊急等......
Public Declare Function SendTo Lib "FV.dll" () As Long
来调用dll (dll和程序放在同一目录)dll中函数
Public Function SendTo()
......
......
......
End Function
这样应该没错啊,怎么会出错呢,大家说说,帮帮忙啊急等......
第一步
组件工程名:project_sum,类名:class1
Public Function sum(la As Long, lb As Long) As Long
sum = la + lb
End Function
编译后,引用测试
Dim obj As project_sum.Class1
Private Sub Command1_Click()
Set obj = New project_sum.Class1
MsgBox obj.Sum(2, 3)
End Sub
看
http://www.applevb.com/art/vb_dll.html
不是每个DLL都能这么用的
你在论坛中搜一下"输出函数"的帖子看看
我已经贴了
你调用DLL的方式,一般针对系统标准DLL的API调用,好象难以行的通吧,反正我没以这种方式用过VB做的DLL.