Icmp6SendEcho2 (Compact 2013)
3/26/2014
This function sends an ICMPv6 echo request and the call returns either immediately, if the Event or ApcRoutine parameter is non-NULL, or returns after the specified timeout. The ReplyBuffer contains the ICMP responses, if any.
Syntax
DWORD WINAPI Icmp6SendEcho2(
HANDLE IcmpHandle,
HANDLE Event,
#ifdef PIO_APC_ROUTINE_DEFINED
PIO_APC_ROUTINE ApcRoutine,
#else
FARPROC ApcRoutine,
#endif
PVOID ApcContext,
struct sockaddr_in6* SourceAddress,
struct sockaddr_in6* DestinationAddress,
LPVOID RequestData,
WORD RequestSize,
PIP_OPTION_INFORMATION RequestOptions,
LPVOID ReplyBuffer,
DWORD ReplySize,
DWORD Timeout
);
Parameters
- IcmpHandle
An open handle returned by Icmp6CreateFile.
- Event
Event to be signaled whenever an ICMPv6 response comes in.
- ApcRoutine
This parameter is always set to NULL in Windows Embedded Compact.
- ApcContext
Optional parameter. Given to the ApcRoutine parameterwhen this call succeeds.
- SourceAddress
The source address of the echo request.
- 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
Holds an array of ICMPV6_ECHO_REPLY structures followed by options and data. The buffer must be large enough to hold at least one ICMPV6_ECHO_REPLY structure. It should be large enough to also hold 8 more bytes of data because this is the size of 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 ApcRoutine or Event is not NULL.
Return Value
Returns the number of replies received and stored in ReplyBuffer. Zero indicates failure. Extended error information is available through GetLastError.
Remarks
On platforms other than Windows NT, the Event, ApcRoutine and ApcContext parameters are ignored.
Requirements
Header |
icmpapi.h |
Library |
icmplib.lib |