如何调用自己定义的dll中的函数

chailei0252 2006-09-19 11:22:28
比如自己在 a.dll中定义了一个函数:Function abc(x as integer,y as integer) as integer

如何在vb中调用呢?
格式怎么写啊?
请赐教 谢谢
...全文
290 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hexinchun148 2007-04-18
  • 打赏
  • 举报
回复
这样好象不行,说什么actives component can't find create object
lisypro 2007-04-06
  • 打赏
  • 举报
回复

class1为a.dll的类名
如类没有类呀
HackerJLY 2007-03-18
  • 打赏
  • 举报
回复
用CreateObject语句,MSDN里有他的用法

padin 2007-03-18
  • 打赏
  • 举报
回复
up
yangao 2006-09-19
  • 打赏
  • 举报
回复
先引用a.dll
然后写以下
Dim TestFunc As Object

Set TestFunc = CreateObject("a.class1")
MsgBox TestFunc.abc(2, 5)

class1为a.dll的类名

863

社区成员

发帖
与我相关
我的任务
社区描述
VB COM/DCOM/COM+
c++ 技术论坛(原bbs)
社区管理员
  • COM/DCOM/COM+社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧