Solved

Icmp functions in Windows 2000 Pro

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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 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.

829 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