?
Solved

Ping

Posted on 2004-08-25
3
Medium Priority
?
219 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 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

850 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