【问题标题】:how to pass a NS Basic Array to static C++ dll如何将 NS 基本数组传递给静态 C++ dll
【发布时间】:2012-06-10 08:27:47
【问题描述】:

我需要将字节数组从 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++函数的签名应该是什么?

【问题讨论】:

    标签: c++ static-libraries nsbasic


    【解决方案1】:
    long myFunc(unsigned char* buffer);
    

    你可能还需要传入数组大小的第二个参数——

    long myFunc(unsigned char* buffer, int size);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-26
      • 1970-01-01
      • 1970-01-01
      • 2021-01-29
      • 2020-04-15
      相关资源
      最近更新 更多