Share via


WapGetNextPrimitiveSize (Compact 2013)

3/26/2014

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, through a call to WapRead. All protocol data units (PDUs) are derived from the WAP_PRIMITIVE_BASE structure.

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

Subsequent calls to WapGetNextPrimitiveSize will retrieve the size of the next packet only after the current primitive has been read by the WapRead function.

Requirements

Header

wap.h

Library

Wap.lib

See Also

Reference

WAP Functions
WapOpen
WapRead
WAP_PRIMITIVE_BASE