Solved

Icmp functions in Windows 2000 Pro

Posted on 2010-09-22
2
427 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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 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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

679 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