John Griswold

I have need to "ping" a device from within an application, and
IcmpCreateFile / IcmpSendEcho / IcmpCloseHandle seemed like a dandy
beginning to solving my problem. So I included all the necessary headers
#include <Iphlpapi.h>
#include <Iptypes.h>
#include <Icmpapi.h>
#include <Winsock2.h>, link to the suggested libraries (iphlpapi.lib,
ws2_32.lib) and all that. The compilation goes as expected, links up OK
to the library file, and then I run the EXE to find that the DLL doesn't
have an entry point for IcmpCreateFile, IcmpSendEcho, or IcmpCloseHandle
(or "Icmp" anything for that matter). I'm running Windows 2000 SP4, and
linking off of the Feb 2003 Platform SDK. After spending the bulk of my
day trying to chase this down, it finally dawned on me to check the
newsgroups. I searched and found references to Iphlpapi.dll, but nothing
about the Icmp* functions. The SDK documentation indicates that these
Icmp* functions should be available on 2000 as well as XP, but the DLLs
I find on my system don't seem to know about them.

No doubt I've manaaged to paint myself into a corner with a series of
"Stupid Programmer Tricks", but is there someone out there who can help
me extricate myself?

Thanks very much for your assistance.





I had the same problem. Here is the solution:

Link with icmp.lib. This is probably in the non standard
visual studio location so you will have to find it and
add the library directory to your project properties.
I found it in
Visual Studio .NET 2003\Vc7\PlatformSDK\Misc\Icmp\Lib

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question