The aforementioned tasks are easy to accomplish in MQL4 too:
- How to transfer a complex data type (for example, structure) to API function
Use integer arrays for structs. Array are always passed by reference, never by value. You even might put strings in integer arrays.
- How to work with the pointer that is returned by the API function.
If it's any kind of C/C++ structure you know the size of the memory block the pointer is pointing to. memcpy() and/or ReadProcessMemory() are your friends.
If it's a string pointer and you don't know the size/length you can use the DLL functions delivered with every MT4 installation. ExpertSample.dll has the tools to read a string from a char pointer.
pp

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Getting Rid of Self-Made DLLs is published at mql5.com:
Author: Alex Sergeev