Download MetaTrader 5
To add comments, please log in or register
Find out how to add a video in the messages editor
Taskin Osman
803
Taskin Osman 2016.01.10 17:06 

Is it somehow possible to carry dll as byte array in body of compiled .ex4 and deploy it at run-time and call functions? Does anybody have experience with it please?

 

thanks 

JC
1389
JC 2016.01.10 17:53  
fx1.net:

Is it somehow possible to carry dll as byte array in body of compiled .ex4 and deploy it at run-time and call functions? Does anybody have experience with it please?

The purpose of doing that isn't immediately apparent. You could potentially try to pack a DLL into an .ex4 file as something which the compiler regarded as a bitmap. However, in order to deploy it, you'd need the "Allow DLL imports" setting turned on - in order to extract the package into something like MQL4\Libraries.

If you have "Allow DLL imports", then there are many reasons why it would be preferable - and simpler - to download the DLL from a remote server rather than trying to unpack it from the .ex4.

Doerk Hilger
1073
Doerk Hilger 2016.01.10 19:45  
jjc:

The purpose of doing that isn't immediately apparent. You could potentially try to pack a DLL into an .ex4 file as something which the compiler regarded as a bitmap. However, in order to deploy it, you'd need the "Allow DLL imports" setting turned on - in order to extract the package into something like MQL4\Libraries.

If you have "Allow DLL imports", then there are many reasons why it would be preferable - and simpler - to download the DLL from a remote server rather than trying to unpack it from the .ex4.

The compiler accepts only bitmaps in a supported format, as I remember. Dont think that this could work that way. At least you would have to have a valid header. 
Ovo Cz
2958
Ovo Cz 2016.01.10 21:32  
fx1.net:

Is it somehow possible to carry dll as byte array in body of compiled .ex4 and deploy it at run-time and call functions? Does anybody have experience with it please?

 

thanks 

I used to do that for ex4 libraries, which probably had the same mechanics of loading. Up to 509 it worked, as the script loaded the library not earlier than with its first call. But now, it is no longer possible, as the MQL script loads the library immediately on launch.

/
To add comments, please log in or register