Solved

Icmp functions in Windows 2000 Pro

Posted on 2010-09-22
2
424 Views
Last Modified: 2012-05-10
Hello Experts!
  I have discovered a incompatibility issue on my software running it on a Windows 2000 Pro.

I have written a code that checks the presence of certain devices on the network with: IcmpCreateFile, IcmpSendEcho and IcmpCloseHandle. My software runs without problem on XP SP2 or higher.

Executing the software on a Windows 2000 Pro SP4 I get entry-point error of IcmpSendEcho on iphlpapi.dll

IPHLPAPI.DLL is present on the W2K system with version 5.0.2195.7097
ICMP.DLL is present on the W2K system with version: 5.0.2134.1

According to MSDN, Icmp functions works on Widnows 2000 Pro using Icmp.dll (http://msdn.microsoft.com/en-us/library/aa366050(VS.85).aspx)

Any suggestion on how to fix this problem and 'why not' a little bit of theory will be appreciate.

Thanks.
0
Comment
Question by:marcodalzotto
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 33734411
Well, as the docs on 'IcmpSendEcho()' (http://msdn.microsoft.com/en-us/library/aa366050%28VS.85%29.aspx) state: "Applications requiring portability with this function across Windows 2000, Windows XP, Windows Server 2003 and later Windows versions should not statically link to either the Icmp.lib or the Iphlpapi.lib file. Instead, the application should check for the presence of IcmpSendEcho in the Iphlpapi.dll with calls to LoadLibrary and GetProcAddress. Failing that, the application should check for the presence of IcmpSendEcho in the Icmp.dll with calls to LoadLibrary and GetProcAddress. "
0
 
LVL 5

Author Comment

by:marcodalzotto
ID: 33767648
Thanks, well read! :)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSL https .net web site force redirect 3 48
Entity Framework 7 41
Need a starter for ETL protocol? 4 55
Expression Evaluater 3 24
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

786 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