This function reads a packet.
HRESULT WapRead( const WAP_HANDLE whHandle, WAP_PRIMITIVE_BASE* const pwpbPrimitiveBuffer, const DWORD dwPrimitiveBufferSize );
[in] The WAP handle retrieved by the WapOpen function.
[out] Pointer to a buffer containing a layer-specific structure of type WAP_PRIMITIVE_BASE. All 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.
[in] The size, in bytes, of the buffer indicated by pwpbPrimitiveBuffer. This value can be obtained by calling WapGetNextPrimitiveSize.