Icmp6SendEcho2 (Windows CE 5.0)

Send Feedback

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.

DWORD WINAPI Icmp6SendEcho2(HANDLEIcmpHandle,HANDLEEvent,
  #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 CE.

  • ApcContext
    Optional parameter. Given to the ApcRoutine parameter**when 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 Values

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

OS Versions: Windows CE .NET 4.1 and later.
Header: Icmpapi.h.
Library: Icmplib.lib.

See Also

ICMP Functions | Icmp6CreateFile

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.