Downloading exe file or dll file from website using WebRequest or Wininet.dll method

 

Hi. Coders.

After back and forth on this project, I need to download exe file or dll file from website from my Meta Trader indicators.

I am talking about simple http website.

My code is able to download any other file types including pdf, jpeg, txt, csv, xml files etc, but I can't download exe file or dll file using my code.

So I am looking for a simple efficient code to download exe or dll file from my indicators from website.

As far as I know, you can use WebRequest function: https://www.mql5.com/en/docs/network/webrequest 

But you can also use Wininet too. I will attach the source code for you.  So you can have a look or modify by yourself. 

I really appreciated any feedback or opinion of yours. :)

Kind regards.

Documentation on MQL5: Common Functions / WebRequest
Documentation on MQL5: Common Functions / WebRequest
  • www.mql5.com
Common Functions / WebRequest - Reference on algorithmic/automated trading language for MetaTrader 5
 

Hello,

I am receiving the folowing error:

Can not load the wininet.dll file.
Where can I find a wininet.dll file that works ?

Best regards

 
costasmar2016:

Hello,

I am receiving the folowing error:

Can not load the wininet.dll file.
Where can I find a wininet.dll file that works ?

Best regards

Are Dll's allowed when you execute the program?

Reason: