help example function must have body why ?
hi guys i try to run a example in EA
https://docs.mql4.com/check/isdllsallowed
but return when i compile
error 'MessageBoxA' - function must have a body MeMTest.mq4 19 9
why ?? o_O
i have able Autotrade and in option i able allow DLL imports
but nothing anyone have some idea ? thankz
Hello .
You need to declare it inside the import
#import "shell32.dll" int ShellExecuteW(int hwnd,string Operation,string File,string Parameters,string Directory,int ShowCmd); #import
Of course a function must have a body otherwise what is the point of the function?
What do you expect to happen when you call this function?
int MessageBoxA(int hWnd, string szText, string szCaption,int nType);
This will at least return something
int MessageBoxA(int hWnd, string szText, string szCaption,int nType) { int x=0; //Calculate the value of x?? return(x); }
hi guys i try to run a example in EA
https://docs.mql4.com/check/isdllsallowed
but return when i compile
error 'MessageBoxA' - function must have a body MeMTest.mq4 19 9
why ?? o_O
i have able Autotrade and in option i able allow DLL imports
but nothing anyone have some idea ? thankz