VS2017 64位VB.net程序调用dll函数
C++写的dll函数声明
Random(void* handle, int len_need, BYTE* pOutbuf);
我在vb.net中声明为:
Public Declare Function Random Lib "test" (ByVal pHandle As ULong, ByVal legth As Integer, ByRef pOutBuf As Byte) As Integer
结果返回的pOutBuf只有一个字节,正常是8个字节的
如果选择32位,声明为:
Public Declare Function Random Lib "test" (ByVal pHandle As Integer,ByVal legth As Integer, ByRef pOutBuf As Byte) As Integer
结果返回正常,随机数都能获取到
对VB不熟悉,请教下怎么修改,64位可以正常返回
重新自己声明一遍问题解决