Share via


WapPing (Compact 2013)

3/26/2014

This function pings another WAP client.

Syntax

HRESULT WapPing(
  const WAP_ADDRESS* const pwaAddress,
  const WORD wIdentifier,
  const DWORD dwSendDataSize,
  DWORD* const pdwReceiveDataSize,
  const DWORD dwTimeout 
);

Parameters

  • pwaAddress
    [in] Pointer to a WAP_ADDRESS structure that contains the destination address of the ping message.
  • wIdentifier
    [in] Identifier for the WCMP-ECHO-REQUEST message. For more information, see WAP Specification WAP-202, "Wireless Control Message Protocol (WCMP)."
  • dwSendDataSize
    [in] The number of bytes in the outgoing packet.
  • pdwReceiveDataSize
    [in] Pointer to the number of bytes in the received packet.
  • dwTimeout
    [in] The number of milliseconds to wait for the ping response.

Return Value

Value

Description

S_OK

Indicates the function was successful.

E_INVALIDARG

Indicates one or more invalid arguments.

E_OUTOFMEMORY

Indicates an out-of-memory error.

E_UNEXPECTED

Indicates an unexpected failure.

E_FAIL

Indicates an unspecified failure.

Remarks

Depending on the bearer type of the pwaAddress parameter, this function will either send an Internet Control Message Protocol (ICMP) message over the User Datagram Protocol (UDP) bearer or a Wireless Control Message Protocol (WCMP) message over the Short Message Service (SMS) bearer. Note that the payload limit for the SMS bearer is only 140 bytes, instead of the 65,528 bytes allowed over UDP. Success of this function does no depend on receiving the correct amount of data or the correct data bytes.

Requirements

Header

wap.h

Library

Wap.lib

See Also

Reference

WAP Functions
WAP_ADDRESS