声明书写问题~~~~~~~~~大虾快来哦!!
我有一个DLL文件(是别人写的)
PB中的声明:
function long md5_getmd5 (ref string input,ref string output) library "sysfunc.dll " alias for "MD5_GetMD5 "
dll作用,通过input参数传入数据,然后将计算的结果通过output返回32MD5码。
我想在VB下使用,怎么声明!!··
[解决办法]
Declare Sub md5_getmd5 Lib "sysfunc.dll " Alias "MD5_GetMD5 " (byval StrInput as string,byref StrOutput as string)
[解决办法]
function long md5_getmd5 (ref string input,ref string output) library "sysfunc.dll " alias for "MD5_GetMD5 "
Public Declare Function md5_getmd5 Lib "sysfunc.dll " Alias "MD5_GetMD5 " (Byval StrInput as string, Byval StrOutput as string) As Long
VB 调用标准 DLL 时,String 类型形参只能 Byval。因为 String 已经是由指针和缓冲区组成的。
[解决办法]
string默认好像是传址的吧。
[解决办法]
VB 里,string默认是传址的。