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 structure represents unit data and is used for transmitting data as unreliable datagrams. If a client is not listening on the incoming port or if the packet is too large, a WCMP message will be generated. For more information, see the "Remarks" section of this topic.

Syntax

typedef struct wdp_unitdata_tag{
  WAP_PRIMITIVE_ID 
wpiPrimitiveID;
  WAP_PRIMITIVE_TYPE 
wptPrimitiveType;
  DWORD 
dwValidFields;
  WAP_ADDRESS 
waSourceAddress;
  DWORD 
dwSourcePort;
  WAP_ADDRESS 
waDestinationAddress;
  DWORD 
dwDestinationPort;
  const BYTE* 
pbUserData;
  DWORD 
dwUserDataSize;
} WDP_UNITDATA;

Members

wpiPrimitiveID

The primitive identifier. The only possible value is WAP_PRIMITIVE_ID_T_DUNITDATA, as defined by the WAP_PRIMITIVE_IDenumeration. Applications will cast the base structure according to this identifier. It is always present and valid.

wptPrimitiveType

The primitive type. Possible values are any of the values defined for the WAP_PRIMITIVE_TYPEenumeration.

dwValidFields

Bitmask that indicates the valid fields in the primitive, dependent on the value of wpiPrimitiveID. For possible values, see WAP_PRIMITIVE_BASE.

waSourceAddress

A WAP_ADDRESSstructure containing the sender's unique address. This member is optional and ignored on a WDP request over IP and Short Message Service (SMS) bearers. The appropriate source address will be filled in when the WDP indication is sent.

dwSourcePort

The port used by the sender. For primitives of type WAP_PRIMITIVE_TYPE_REQUEST, this member is ignored. The source port is filled in with the value specified in the dwLocalPortparameter in WapOpencalls.

waDestinationAddress

A WAP_ADDRESSstructure containing the destination address of the user data that is being sent.

dwDestinationPort

The destination port of the user data that is being sent.

pbUserData

Pointer to the datagram that is being sent.

dwUserDataSize

The number of bytes in the datagram indicated by pbUserData .

Remarks

Different bearers, such as IP and GSM Short Message Service (SMS), can have different behaviors when handling requests to send 0 bytes of user data. In particular, callers should not rely on being able to send 0-byte datagrams.

Requirements

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

See Also