Solved

Ping

Posted on 2004-08-25
3
204 Views
Last Modified: 2010-04-01
Hi, I want to know how I could code in "ping" support into my program without using the dos-ping...

The problem is that you need to use raw sockets, which are not supported if you are not logged on as an administrator... On the other hand, I don't want to use the external ping-thingie because what if the program has been deleted for some reason?

Can someone give me an answer on this?


Thanks
0
Comment
Question by:G00fy
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
scn earned 100 total points
ID: 11901017
Look for IcmpSendEcho, IcmpCreateFile in the MSDN. It works even if the user is not administrator.
0
 

Author Comment

by:G00fy
ID: 11901033
Mmmm, that would be half of my problem/solution...

------------------------------------------
Requirements
Client: Requires Windows XP or Windows 2000 Professional.
------------------------------------------


I have now code to ping as administrator using raw sockets... Can i use it on win98 without a problem and then on windows 2k/XP with the functions you proposed?
0
 
LVL 3

Expert Comment

by:scn
ID: 11901556
These functions are part of the icmp.dll library, which also exists on Windows 98
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

706 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

21 Experts available now in Live!

Get 1:1 Help Now