Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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_ADDRESSstructure containing 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

Returns S_OK if successful. If unsuccessful, this function returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL.

Remarks

Depending on the bearer type of the pwaAddressparameter, 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 Short Message Service (SMS) bearer is only 140 bytes, instead of the 65,528 bytes allowed over UDP. Success of this function does notdepend on receiving the correct amount of data or the correct data bytes.

Requirements

Header wap.h
Library Wap.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

WAP_ADDRESS

Concepts

WAP Functions