Partager via


WapRead (Compact 2013)

3/26/2014

This function reads a packet.

Syntax

HRESULT WapRead(
  const WAP_HANDLE whHandle,
  WAP_PRIMITIVE_BASE* const pwpbPrimitiveBuffer,
  const DWORD dwPrimitiveBufferSize 
);

Parameters

  • whHandle
    [in] The WAP handle retrieved by the WapOpen function.
  • pwpbPrimitiveBuffer
    [out] Pointer to a buffer that contains a layer-specific structure of type WAP_PRIMITIVE_BASE. All protocol data units (PDUs) are derived from the WAP_PRIMITIVE_BASE structure. If the buffer indicated by this parameter is too small to hold the primitive, the function will return E_FAIL.
  • dwPrimitiveBufferSize
    [in] The size, in bytes, of the buffer indicated by pwpbPrimitiveBuffer. This value can be obtained by calling WapGetNextPrimitiveSize.

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.

Requirements

Header

wap.h

Library

Wap.lib

See Also

Reference

WAP Functions
WapOpen
WapGetNextPrimitiveSize
WAP_PRIMITIVE_BASE