我需要将字节数组从 NS Basic 传递到静态 C++ dll。
在 NS Basic 中,我将这样的函数定义为静态 dll。
Declare "Function myFunc Lib ""dllLib.dll""(ByVal data As Byte()) As Long"
Buffer = Array(0,1,2,3)
'call the function
myFunc(Buffer)
为此,我想知道静态 C++ 函数的签名应该是什么?
最佳答案
long myFunc(unsigned char* buffer);
你可能还需要传入数组的大小第二个参数——
long myFunc(unsigned char* buffer, int size);
关于c++ - 如何将 NS 基本数组传递给静态 C++ dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10967309/