Hi Arry.
You asked for a post to show how to convert C source to a DLL callable from MT4. Here is one way:
Assuming that you have modified the C Source so that the function to be called is something like:
#define WIN32_LEAN_AND_MEAN
#include <math.h>
#include <windows.h>
__declspec (dllexport) void __stdcall BN561(double * inputs, double * outputs) {...}
Using Microsoft Visual Studio 8.0 or 9.0
1. Set up a folder
2. Copy the c source into the folder
3. Make a .def file to refer to the net function
LIBRARY "XYZ"
EXPORTS
BN561
4. Start up VC and set up a BLANK new project ( DLL)
5. Import the properties from the file attached (tools/import)
6. Modify project properties (linker) to add the def file
7. Load c source into project
8. Build debug and release DLL's
You can test the DLL call using the attached dll function viewer. If you did everything right, when you drag the DLL onto the function viewer, the available functions will be shown in the window. If your function shows (name only, no screwy symbols) then the DLL can be called from MT4. If you get screwy symbols, then something is wrong. Let me know how you do.
You asked for a post to show how to convert C source to a DLL callable from MT4. Here is one way:
Assuming that you have modified the C Source so that the function to be called is something like:
#define WIN32_LEAN_AND_MEAN
#include <math.h>
#include <windows.h>
__declspec (dllexport) void __stdcall BN561(double * inputs, double * outputs) {...}
Using Microsoft Visual Studio 8.0 or 9.0
1. Set up a folder
2. Copy the c source into the folder
3. Make a .def file to refer to the net function
LIBRARY "XYZ"
EXPORTS
BN561
4. Start up VC and set up a BLANK new project ( DLL)
5. Import the properties from the file attached (tools/import)
6. Modify project properties (linker) to add the def file
7. Load c source into project
8. Build debug and release DLL's
You can test the DLL call using the attached dll function viewer. If you did everything right, when you drag the DLL onto the function viewer, the available functions will be shown in the window. If your function shows (name only, no screwy symbols) then the DLL can be called from MT4. If you get screwy symbols, then something is wrong. Let me know how you do.