MQ4 调用 DLL 问题,请那位大哥帮忙参考下

 

我现在用C++写了个DLL ,只提供了一个加法函数,目的是为了测试.
#include "stdafx.h"
#ifdef FUNCTIONDLL
#else
#define FUNCTIONDLL _declspec(dllexport)
#endif
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C" FUNCTIONDLL _stdcall int Test(const int a,const int b)
{
return a+b;
}
将DLL 放入experts\libraries 文件夹下面

编译后的ex4文件放入 experts\indicators 文件夹下面

MQ4 中导入DLL代码

#import "Test.dll"
int Test(int a,int b);
#import

调用函数的代码写在start方法里面

int temp = Test(1,2);//程序每次执行到这里,后面的语句就不执行了

Alert(temp);

MT4 我已经设置了允许导入动态链接库,实在被这个问题搞的挺郁闷的,请那位大侠指教下,thank yous。

DLL我加在附件里面了

在线等待

邮箱:shuanghesir@yahoo.cn

QQ:1019007821

原因: