Solved

Ping

Posted on 2004-08-25
3
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which IDE to use to begin C++ training? 5 70
How to split this in C++ 4 117
C++ :Change value from  DisableCMD registry 4 69
Coding for the first time 9 62
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

735 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