Link to home
Start Free TrialLog in
Avatar of gajender_99
gajender_99

asked on

Pinging a host

I want to know how can we ping a host and get back the feed back that it was sucessful. as we can do this by just using the ping command in dos prompt, but i want to use its equilavant in powerbuilder.

if you have any function or api function just let me know or how can we do it.

thanks in advance
Avatar of namasi_navaretnam
namasi_navaretnam
Flag of United States of America image

RUN(" ping localhost > c:\test.txt " )

Sleep(5000) // wait for 5 seconds

Read c:\test.txt using FileOpen, FileRead, FileClose functions.

Instad of RUN you can use ShellExecuteA API

Function long ShellExecuteA( long hWindow, string Operation, string File, string Parameters, string Directory, long Visible) Library 'shell32'

HTH,

Namasi Navaretnam
ASKER CERTIFIED SOLUTION
Avatar of sandeep_patel
sandeep_patel
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of buasuwan
buasuwan

Avatar of gajender_99

ASKER

Hi Sandeep

my E-mail address is gajender_99@hotmail.com