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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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'


Namasi Navaretnam

i have sample application for ping if u want source code give your email id so that i can mail you pbl.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gajender_99Author Commented:
Hi Sandeep

my E-mail address is
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.