Using Win32 functions in Visual FoxPro Image Gallery
IP Helper
..msdn
GetAdaptersAddresses
GetAdaptersInfo
GetBestInterface
GetBestRoute
GetIfEntry
GetInterfaceInfo
GetIpAddrTable
GetIpNetTable
GetIpStatistics
GetNetworkParams
GetNumberOfInterfaces
GetRTTAndHopCount
GetTcp6Table
GetTcpStatistics
GetTcpTable
GetUdpTable
IcmpCloseHandle
IcmpCreateFile
IcmpSendEcho
if_indextoname
if_nametoindex
IpReleaseAddress
IpRenewAddress
SendARP
Code examples:
How to ping a remote site using ICMP API calls
IcmpSendEcho
..msdn    Add comment     W32 Constants      Translate this page
Sends an ICMP Echo request and returns any replies. The call returns when the time-out has expired or the reply buffer is filled.
Code examples:
How to ping a remote site using ICMP API calls
Declaration:
DWORD IcmpSendEcho(
  HANDLE IcmpHandle,
  IPAddr DestinationAddress,
  LPVOID RequestData,
  WORD RequestSize,
  PIP_OPTION_INFORMATION RequestOptions,
  LPVOID ReplyBuffer,
  DWORD ReplySize,
  DWORD Timeout
);

FoxPro declaration:
DECLARE INTEGER IcmpSendEcho IN icmp;
    INTEGER  IcmpHandle,;
    INTEGER  DestinationAddress,;
    STRING @ RequestData,;
    LONG     RequestSize,;
    STRING @ RequestOptions,;
    STRING @ ReplyBuffer,;
    LONG     ReplySize,;
    LONG     timeout
Parameters:
IcmpHandle
[in] Open handle returned by IcmpCreateFile.

DestinationAddress
[in] Destination of the echo request, in the form of an IPAddr structure.

RequestData
[in] Buffer that contains the data to send in the request.

RequestSize
[in] Size of the request data buffer, in bytes.

RequestOptions
[in] Pointer to the IP header options for the request, in the form of an IP_OPTION_INFORMATION structure. May be NULL.

ReplyBuffer
[in, out] Buffer to hold any replies to the request. Upon return, the buffer contains an array of ICMP_ECHO_REPLY structures followed by the options and data for the replies.

ReplySize
[in] Allocated size of the reply buffer, in bytes.

Timeout
[in] Time to wait for replies, in milliseconds.
Return value:
Returns the number of ICMP_ECHO_REPLY structures stored in ReplyBuffer.
My comment:
IcmpSendEcho is available in icmp.dll on Windows 2000; it is available in iphlpapi.dll on later versions of Windows. OS version checking is not recommended.

The IcmpSendEcho2 function sends an ICMP Echo request and returns either immediately (if Event or ApcRoutine is non-NULL) or returns after the specified time-out. The ReplyBuffer contains the ICMP responses, if any.
Word Index links for the IcmpSendEcho :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-04-12 12:13:37
Modified: 2005-04-12 12:17:14
Visited in last 7 days: 22
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.163.61.66)
19 sec.Function: 'MAPIAddress'
37 sec.Function: 'HttpSendRequest'
56 sec.Function: 'mixerGetLineControls'
1.27 min.Function: 'SetThreadExecutionState'
1.57 min.Function: 'SetLastError'
1.93 min.Function: 'IcmpCreateFile'
2.3 min.Function: 'CryptGetHashParam'
2.65 min.Function: 'ZeroMemory'
2.97 min.Function: 'IsWindowVisible'
3.33 min.
Function group: 'Shell Lightweight Utility APIs -- misc. functions'
Google
Advertise here!