Please help me to call dll file using MT4
File name: FileName.dll
Function name is : CheckFunction
Metastock formula to call dll function is :
Buy
ExtFml( "FileName.CheckFunction") = 1
Sell
ExtFml( "FileName.CheckFunction") = 0
General steps to call any function from any dll are
1) Load Library
2) obtain function pointer of the desired function from the export table of the loaded library
3) call the function pointer
4) Repeat steps 2 and 3 as many times as necessary
5) Unload library
But, to successfully complete each of the step requires some programming skill.
There are lot of complications involved. Some C DLL (notably microsoft) use parameter loading in opposite order (sometimes called PASCAL convention) as opposed to default C convention.
Some compilers expect strings memory allocation to be on stack whereas others expect it to be in heap memory.