Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Ping

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

636 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