Ping IP with EA

 

Dear all,

I need to Ping an IP to check if my VPS is alive or not. I want to code with EA mql, of course !

I try to use ShellExecuteA, it can call cmd.exe then ping.

Unfortunately, ShellExecuteA does not return value of ping's result.

Is there any other way that we can check if my VPS SERVER IS ALIVE or not ?


Thank you very much !

 
I have a different approach to the same issue . . . https://www.mql5.com/en/forum/136926
 
search for ping software with google and/or in download.com
 
Dohung:

Dear all,

I need to Ping an IP to check if my VPS is alive or not. I want to code with EA mql, of course !

I try to use ShellExecuteA, it can call cmd.exe then ping.

Unfortunately, ShellExecuteA does not return value of ping's result.

Is there any other way that we can check if my VPS SERVER IS ALIVE or not ?


Thank you very much !

Hi,

If you like beta testing, please test this script, if you (or anyone else) find a bug, write here.

Regards!

Files:
 

Dear erzo,


Please attach Iphlpapi.dll and Ws2_32.dll.

Thank you for your help

Regards!

 

Sorry, I have Windows Xp and I have them in Windows/system32 by default. Check it first before download. Links:

http://dll.downloadatoz.com/iphlpapi.dll-file.html

http://dll.downloadatoz.com/ws2_32.dll-file.html

 

@erzo,

it works perfectly !

Thank you very much erzo!

 

I get Icmp: Error, Status = 0: General failure. 

I can ping from cmd line, and the test IP is on my network and pingable.

Not sure what is wrong.

 
Quint Boney #:

I get Icmp: Error, Status = 0: General failure. 

I can ping from cmd line, and the test IP is on my network and pingable.

Not sure what is wrong.

I got same problem , can we continue this thread ?
Reason: