首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

vb调用vc++的dll?解决思路

2012-03-09 
vb调用vc++的dll?????这里是c的申明voidrun(char*srcPath,char*savePath,inttop,intleft,intbottom,intrig

vb调用vc++的dll?????
这里是c的申明
void   run(char*   srcPath,   char*   savePath,   int   top,   int   left,   int   bottom,   int   right)
在VB中如果申明,另外如何调用
谢谢各位大虾。。

[解决办法]
假定你的 DLL 名为 A.DLL,假定参数 srcPath 和 savePath 不做为输出参数(否则定义为 byval)

Declare Sub run Lib "A.DLL " (byval srcPath as string, byval savePath as string, top as long, left as long, bottom as long, right as long)

dim srcPath as string
dim savePath as string
srcPath = "C:\A " & chr(0)
savPath = "C:\B " & chr(0)

run srcPath, savePath, 0, 0, 100, 100

[解决办法]
declare function run lib "xx.dll " (byval srcPath as string, byval savePath as string, byval ltop as long, byval lleft as long, byval lbottom as long, byval lright as long)

call run( "c:\ ", "d:\ ", 100, 100, 200, 200)

热点排行