Solved

Pinging a host

Posted on 2003-10-22
4
479 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
ID: 9598080
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
ID: 9598394
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
ID: 9598742
0
 
LVL 8

Author Comment

by:gajender_99
ID: 9607602
Hi Sandeep

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

920 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

13 Experts available now in Live!

Get 1:1 Help Now