vb编程怎么调用.Dll库函数
2个回答
展开全部
vb调用dll对dll的要求比较高。如果是c++写的dll,要针对vb优化。
追问
要是c语言的dll库函数的 用vb调用的格式是怎么样的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
vb编写的dll:
注册dll,引用dll,private xxx as dll中的类名,在form_load中初始化:set xxx = new dll中的类名
或:
注册dll,set xxx = createobject("工程名.类名")
vc 编些的标准dll:
private|public declare function|sub 函数名 lib "dll名" [Alias "dll中的函数名"](参数) as 返回值类型
例:
Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
注册dll,引用dll,private xxx as dll中的类名,在form_load中初始化:set xxx = new dll中的类名
或:
注册dll,set xxx = createobject("工程名.类名")
vc 编些的标准dll:
private|public declare function|sub 函数名 lib "dll名" [Alias "dll中的函数名"](参数) as 返回值类型
例:
Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询