IcmpSendEcho2 (Windows CE 5.0)
This function sends an ICMP echo request and the call returns either immediately, if the Event parameter is non-NULL, or returns after the specified timeout. The ReplyBuffer contains the ICMP responses, if any.
IcmpSendEcho2(HANDLEIcmpHandle,HANDLEEvent,
#ifdef PIO_APC_ROUTINE_DEFINED
PIO_APC_ROUTINEApcRoutine,
#else
FARPROCApcRoutine,
#endif
PVOIDApcContext,IPAddrDestinationAddress,LPVOIDRequestData,WORDRequestSize,PIP_OPTION_INFORMATIONRequestOptions,LPVOIDReplyBuffer,DWORDReplySize,DWORDTimeout);
Parameters
IcmpHandle
An open handle returned by IcmpCreateFile.Event
Event to be signalled whenever an ICMPv6 response comes in.ApcRoutine
Parameter that is always set to NULL in Windows CE.ApcContext
Optional. This parameter is given to the ApcRoutine parameter when this call succeeds.DestinationAddress
The destination of the echo request.RequestData
A buffer containing the data to send in the request.RequestSize
The number of bytes in the request data buffer.RequestOptions
Pointer to the IP header options for the request. This parameter may be NULL.ReplyBuffer
A buffer to hold any replies to the request. On return, the buffer will contain an array of ICMP_ECHO_REPLY structures followed by options and data. The buffer must be large enough to hold at least one ICMP_ECHO_REPLY structure. It should be large enough also to hold 8 more bytes of data to accommodate an ICMP error message.ReplySize
The size in bytes of the reply buffer.Timeout
The time in milliseconds to wait for replies.This is not used if either ApcRoutine or Event is not NULL.
Return Values
Returns the number of replies received and stored in ReplyBuffer. Zero indicates failure. Extended error information is available through GetLastError.
Remarks
On platforms not based on Windows NT, the Event, ApcRoutine and ApcContext parameters are ignored.
Requirements
OS Versions: Windows CE 2.12 and later.
Header: Icmpapi.h.
Library: Icmplib.lib.
See Also
ICMP Functions | IcmpCreateFile
Send Feedback on this topic to the authors