Authorization DLL that work for both indicators and EA's
$30-250 USD
Paid on delivery
A while back we had a DLL created, which authorized information
from a certain webaddress and return it to the trading platform Metatrader. The problem is that Metatrader doesn't handle this the same way for indicators as for EA's, hence we need an update for the DLL.
The information I managed to get regarding the problem, is the following:
"The only obvious difference is that when called from an indicator all function
calls always come from MT4's main thread while in scripts and EAs every single
call comes from some random other thread. Maybe (wild guess) your compiler (or
you) does not create code to hook into DLL_THREAD_ATTACH and initialize the
treading related stuff of its runtime library (or other libraries that are used)
for every thread created outside your dll and then you try to use things that
are only possible with properly initialized threading or only from within the
main thread or from the thread that initialized this library."
and
"The only significant difference between use of a DLL from an EA versus an indicator is the threading model. This brings to mind two specific things which might be the cause of your problem, in addition to the DLL_THREAD_ATTACH suggestion:
1. An assumption in the DLL that CoInitialize() has been called on the thread. This is likely to be true of the main MT4 UI thread which is used for indicators, but I'm pretty sure it's not true for the temporary threads on which an EA runs.
2. A DLL running from an indicator in the main MT4 UI thread has to be careful not to lock the MT4 user interface, e.g. don't call the Win32 Sleep() API function. If the DLL is doing communication with a remote server, it will either have to be doing its own multi-threading internally or it will have to be using some sort of callback mechanism to avoid locking the UI. The way in which the DLL is setting this up may be making an assumption about only ever being called on a single thread etc. Specifically, the DLL may be using a callback mechanism which assumes that the thread which creates the callback will continue to exist indefinitely."
We have the source code for the first DLL, which only need to be modified according the information above to work with indicators, scripts and EA's in Metatrader 4.
This project is urgent, so we need a delivery in the beginning of next week (final version at wednesday).
Project ID: #844255