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 gets the packet size of the next packet to read.

Syntax

HRESULT WapGetNextPrimitiveSize(
  const WAP_HANDLE 
whHandle,
  DWORD* const 
pdwNextPrimitiveSize 
);

Parameters

whHandle

[in] The WAP handle returned by WapOpen.

pdwNextPrimitiveSize

[out] Pointer to the size, in bytes, of the buffer for the next packet to read, via a call to WapRead. All protocol data units (PDUs) are derived from the WAP_PRIMITIVE_BASEstructure.

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

Subsequent calls to WapGetNextPrimitiveSizewill retrieve the size of the next packet only after the current primitive has been read by the WapReadfunction.

Requirements

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

See Also