The easy way of doing this is to get a recent version of the Platform SDK from Microsoft's site and #include <icmpapi.h>. Then you'll get all the Icmp functions defined without the need for LoadLibrary/GetProcAddress.
Otherwise: hIcmp should be of type HINSTANCE or HMODULE. They're not interchangable with HANDLE (HANDLE is a handle to a kernel object; HINSTANCE is a handle to a DLL or EXE). Then you'll need to declare all the Icmp functions as appropriate, e.g.:
Code:
typedef HANDLE (WINAPI *ICMPCREATEFILE)(void);
typedef DWORD (WINAPI *ICMPSENDECHO)(HANDLE, IPAddr, LPWORD, LPVOID, PIP_POPTION_INFORMATION, LPVOID, DWORD, DWORD);
ICMPCREATEFILE IcmpCreateFile;
ICMPSENDECHO IcmpSendEcho;
// ...
IcmpCreateFile = (ICMPCREATEFILE) GetProcAddress(hIcmp, "IcmpCreateFile");
etc.
But it would be easier to get a new copy of the Platform SDK. In fact, if you have icmp.lib, it seems likely that you have icmpapi.h.