MQL側は以下のように渡す。
// DLLをインポートする.
#import "libConvCharSet.dll"
// DLLで作成した関数を定義する.
void getAtai(double&[],int);
void setAtai(double&[],int);
#import
DLL側は以下のように受け取る。
extern "C"
MT4_EXPFUNC void __stdcall setAtai(double* a, int size)
{
for (int i = 0; i < size; i++)
{
atai[i] = a[i];
}
}
extern "C"
MT4_EXPFUNC void __stdcall getAtai(double* a, int size)
{
for (int i = 0; i < size; i++)
{
a[i] = atai[i];
}
}