Try not handle the exception CF 2 -
06-08-2010
, 03:03 AM
Hello group I discovered that in this code:
/ / Allocate ICMP_ECHO_REPLY structure
ICMP_ECHO_REPLY reply = new ICMP_ECHO_REPLY (255);
reply.DataSize = 255;
IntPtr pData = LocalAlloc (LMEM_ZEROINIT, reply.DataSize);
reply.Data = pData;
IcmpCreateFile IntPtr h = ();
.............................
IcmpCloseHandle (h);
LocalFree (reply.Data);
the last line triggers an exception if enclosed in a try you can not
manage and exit. The problem occurs when an ip is not reachable. Why not
allow me to manage the application? maybe some compiler option?
Dan |