DLL deployment

 

Hello,

assume you have a DLL written in C++ which you like to sell. Users can call exported functions.

You provide an .mqh wich defines all exported functions.

My question: Where to place .dll and .mqh from my setup routine. i'd like beware users from setup trouble so my installation routine should automatically find the right place

and be able to copy files to there.

 

The article

 

https://www.mql5.com/en/articles/18

suggest to output DLL directly below MT5 folder. obviously, a DLL located there can't be found from script.

 

Additional information: if have MetaTrader5 demo installed. 

if found that a new script which wants to use the DLL, expects include files -> include<testdll.mqh>

expects this file at a curious location. in my case:

 

C:\Users\myuser\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\include\testdll.mqh 

 

So below users, mt5 mirrors it's folder structure and holds all user specified data.

I don't know 1. how to get this string D0E8209F77C8CF37AD8BF550E51FF075

and how to install such a dll along with all necessary files for all users ? 


can anyone help ? Is there a detailed description how to deploy custom stuff ?

 

Thank you in advance 

How to Exchange Data: A DLL for MQL5 in 10 Minutes
  • 2010.01.27
  • MetaQuotes Software Corp.
  • www.mql5.com
Now not so many developers remember how to write a simple DLL, and what are special features of different system binding. Using several examples, I will try to show the entire process of the simple DLL's creation in 10 minutes, as well as to discuss some technical details of our binding implementation. I will show the step-by-step process of DLL creation in Visual Studio with examples of exchanging different types of variables (numbers, arrays, strings, etc.). Besides I will explain how to protect your client terminal from crashes in custom DLLs.
 
Documentation on MQL5: Language Basics / Preprocessor / Importing Functions (#import)
  • www.mql5.com
Language Basics / Preprocessor / Importing Functions (#import) - Documentation on MQL5
 
alexvd:

Have you read this topic (https://www.mql5.com/en/docs/basis/preprosessor/import)?

 

Hello,

thank you for reply.  This article is about how to utilize custom DLL. This is not my point.

My point shortly is: where must a custom dll be located to be used in Expert Advisor or script ?

I found it can be located in

 

users\.....\Roaming\MetaQuotes\Terminal\Large Hex Number\MQL5\Scripts  [1]

if you need to call DLL from script. 

 or 

system path 


System path is ok. However, my custom script must be located below this silly path (see [1]) 

 Why not simply in metaTrader\mql5\scripts

 or is there a way to do this ? 

 

Please note, i like to know this to be able for a smart deployment of my scripts.

Thank you 

Reason: