Oi,
Eu estou tentando usar uma DLL do meu EA no MT4 (Build 1010)
Eu escrevi uma DLL usando C com VS 2015
mas estou sempre recebendo o erro 126
Eu tentei colocar a DLL na pasta Data (Build 600 pastas):
C: \ Usuários \ XXX \ AppData \ Roaming \ MetaQuotes \ Terminal \ XXX \ MQL4 \ Libraries
e eu tentei colocá-lo em uma pasta diferente, sem sorte, eu continuo recebendo 126 erro
minha DLL é cumprida em 32 bits.
meu código DLL é -
stdafx.h:
#pragma once
#include targetver.h
#define WIN32_LEAN_AND_MEAN/Excluir coisas raramente usadas dos cabeçalhos do Windows
#include lt; windows.hgt;
//# define MT4_EXPFUNC __declspec (dllexport)/eu tentei esta linha também
#define MT4_EXPFUNC extern C __declspec (dllexport)
myDLL.cpp:
#include stdafx.h
#include lt; complexgt;
MT4_EXPFUNC int mySum (int a, int b)
{
return a b;
}
MT4_EXPFUNC double myPower (double a, double b)
{
return std:
como (a, b);
}
meu código EA é:
myEA.mq4:
#import myDLL.dll
int mySum (int, int);
double myPower (duplo, duplo);
#importar
int OnInit ()
{
Print (Retornado da Soma no módulo init, mySum (1,2));
Imprimir (Retornado do Power no módulo init, myPower (2,2));
return (INIT_SUCCEEDED);
}
void OnDeinit (razão int const)
{
}
void OnTick ()
{
Imprimir (retornado da soma no módulo inicial, mySum (3,4));
Imprimir (Retornado do módulo Power in start, myPower (3,4));
}
Obrigado,
Shay