Works great. Just remember to include the winsock.lib and the icmplib.lib under project settings. Thx. Btw: I am experiencing approx. 20 seconds cost pr. single call to Ping eventhough the ping time is about 600 ms. Is that what can be expected? Any comments appriciated.
Posted by kingjac
on 04/20/2004 12:08pm
I tried to compile the code using Embedded visual c++ 4.0 but I always get an error message that is the following:
C:\Documents and Settings\Administrator\Desktop\CE_DEV\ceping.rc(189) : fatal error RC1015: cannot open include file 'res\ceping.rc2'.
Error executing rc.exe.
I will appreciate if you can send me all missing files or the whole code, one that will work other than the one listed here online.
Thanks in advance
well, I just made a folder called "res" and placed there a rc2 and a ico file I borrowed form another projec.t usually, there's nothing specific in the rc2 file anyhow.
then, I added the icmp.lib to the linker-settings, disabled the precompiled headers and then I compiled as release.
now everything works.
Douglas Boling's book says you can just use the lib files and grab the header files from elsewhere. I had the same problem with
error LNK2019: unresolved external symbol "int __cdecl IcmpCloseHandle(void *)" (?IcmpCloseHandle@@YAHPAX@Z) referenced in function
rror LNK2019: unresolved external symbol "unsigned long __cdecl IcmpSendEcho(void *,unsigned long,void *,unsigned short,struct ip_option_information *,void *,unsigned long,unsigned long)" (?IcmpSendEcho@@YAKPAXK0GPAUip_option_inf
Very annoying. I wasted the afternoon tracking this problem down. Glad I didn't purchase his book but instead borrowed it. =)
C:\Windows CE Tools\wce300\MS Pocket PC\lib>"c:\program files\microsoft embedded
tools\evc\wce300\bin\dumpbin" /EXPORTS "C:\windows ce tools\wce300\MS Pocket PC
Microsoft (R) COFF Binary File Dumper Version 6.20.8700
Copyright (C) Microsoft Corp 1992-2000. All rights reserved.
Dump of file C:\windows ce tools\wce300\MS Pocket PC\lib\arm\icmplib.lib