carry dll inside .ex4

Back to topics list To post a new topic, please log in or register
avatar
273
fx1.net 2016.01.10 18: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 

avatar
1318
jjc 2016.01.10 18: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.

avatar
119
Doerk 2016.01.10 20: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. 
avatar
1109
Ovo 2016.01.10 22: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.

Back to topics list  

To add comments, please log in or register