VB调用C++编写的DLL遇到的问题
C++编写的DLL中的含有2个数据结构:typedef struct {
char OpType[2]; //操作类型
char TrType[2]; //交易类型
char Reserved[48]; //预留字段
}strUp;
typedef struct {
char OpType[2]; //操作类型
char TrType[2]; //交易类型
char Reserved[48]; //预留字段
}strDown;
动态库为 myDll.Dll
接口函数为 myMethod(int i,char * strUp,char * strDown)
请问在VB中应该如何调用? --------------------编程问答--------------------
Private Declare Sub myMethod Lib "myDll.Dll" (Byval i As Long, Byref strUp As Byte, Byref strDown As Byte)
Dim strUp(51) As Byte, strDown(51) As Byte
myMethod 1, strUp(0), strDown(0)
补充:VB , 基础类