Solved

Pinging a host

Posted on 2003-10-22
4
475 Views
Last Modified: 2013-12-26
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
0
Comment
Question by:gajender_99
4 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
Comment Utility
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
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 125 total points
Comment Utility
hi,

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

-sandeep.
0
 
LVL 5

Expert Comment

by:buasuwan
Comment Utility
0
 
LVL 8

Author Comment

by:gajender_99
Comment Utility
Hi Sandeep

my E-mail address is gajender_99@hotmail.com
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now