Solved

Icmp functions in Windows 2000 Pro

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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…
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now