I'm looking for an alternative to redirect the Link to the WEB Browser directly using Mql5 without having to import DLL (shell32.dll / ShellExecuteW)

 
Good morning people...
   Please, does anyone know how to make a Link available in the Yes/No message in OnInit() so that the client can access a specific site on BroBrowser Web, just like in #property link??
   I got it using DLL: shell32.dll but I didn't want to Import DLL...
Is there any way to access/redirect the Link to the WEB Browser directly using Mql5 without having to import??? 🙏
 
 

Examples of Webrequest but you will need to allow the website in MT settings 

string cookie=NULL,headers; 
   char   post[],result[]; 
   string url="https://finance.yahoo.com"; 
//--- To enable access to the server, you should add URL "https://finance.yahoo.com" 
//--- to the list of allowed URLs (Main Menu->Tools->Options, tab "Expert Advisors"): 
//--- Resetting the last error code 
   ResetLastError(); 
//--- Downloading a html page from Yahoo Finance 
   int res=WebRequest("GET",url,cookie,NULL,500,post,0,result,headers); 
   if(res==-1) 
     { 
      Print("Error in WebRequest. Error code  =",GetLastError()); 
      //--- Perhaps the URL is not listed, display a message about the necessity to add the address 
      MessageBox("Add the address '"+url+"' to the list of allowed URLs on tab 'Expert Advisors'","Error",MB_ICONINFORMATION); 
     } 
   else 
     { 
      if(res==200) 
        { 
         //--- Successful download 
         PrintFormat("The file has been successfully downloaded, File size %d byte.",ArraySize(result)); 
         //PrintFormat("Server headers: %s",headers); 
         //--- Saving the data to a file 
         int filehandle=FileOpen("url.htm",FILE_WRITE|FILE_BIN); 
         if(filehandle!=INVALID_HANDLE) 
           { 
            //--- Saving the contents of the result[] array to a file 
            FileWriteArray(filehandle,result,0,ArraySize(result)); 
            //--- Closing the file 
            FileClose(filehandle); 
           } 
         else 
            Print("Error in FileOpen. Error code =",GetLastError()); 
        } 
      else 
         PrintFormat("Downloading '%s' failed, error code %d",url,res); 
     } 
 

Ugochukwu Mobi #:
Use WebRequest


So friend, I already use the WebRequest to get information from the Site... But what I want is to forward the user to a link in his Browser. I don't think I explained it properly. Anyway thanks for trying to help. 🙏😉👍
 
Dayvison Andrews #:
So friend, I already use the WebRequest to get information from the Site... But what I want is to forward the user to a link in his Browser. I don't think I explained it properly. Anyway thanks for trying to help. 🙏😉👍

You can do that too with webrequest 

 
Ugochukwu Mobi #:

You can do that too with webrequest 

I couldn't with the WebRequest friend, would it be changing the method from "GET" to "TRACE" or another?? Could you teach me please?? 
 
Dayvison Andrews #:
I couldn't with the WebRequest friend, would it be changing the method from "GET" to "TRACE" or another?? Could you teach me please?? 

When you are saying you could not meaning you tried and failed, Let me see what you tried

 

Redirect that you want to do seems an action to open a web browser outside metatrader.

Webrequest cannot help you in this case.

As far as I know, the only way is using .dll to interact with OS and opening the web browser.

 
Ugochukwu Mobi #: You can do that too with webrequest 

You are not understanding the OP properly. He does not want to read data via the web. He wants the physical web browser on the users computer to be executed and open a predetermined URL of his choosing.

 
Dayvison Andrews:
Good morning people...
   Please, does anyone know how to make a Link available in the Yes/No message in OnInit() so that the client can access a specific site on BroBrowser Web, just like in #property link??
   I got it using DLL: shell32.dll but I didn't want to Import DLL...
Is there any way to access/redirect the Link to the WEB Browser directly using Mql5 without having to import??? 🙏
Unfortunately it is not possible to do with pure MQL. It can only be done by the ".dll" method calling the Windows API. There is no other way.
 
Fernando Carreiro # MQL : não é possível fazer puro. Isso só pode ser feito pelo método ".dll" da API do Windows. Não há outro caminho.
Ok my friends, thank you very much for the explanation and attempts to help everyone. I had read several forums and none was clear whether or not to do it via mql5. Thank you again!