1. 使用统一的调用约束(__stdcall)
2. array of 调用
delphi 接口:
procedure ProcessArray(const Arr: array of Integer); stdcall;
VC:
typedef void(__stdcall *ProcessArrayFunc)(const int*, int);
ProcessArrayFunc processArray = (ProcessArrayFunc)GetProcAddress(hLib, "ProcessArray");
if (processArray) {
int arr[] = {1, 2, 3, 4, 5}; int size = sizeof(arr) / sizeof(arr[0]);
processArray(arr, size);
}
标签:arr,调用,processArray,int,Delphi,DLL,ProcessArrayFunc,注意事项,stdcall From: https://www.cnblogs.com/denli/p/17824435.html