Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IPacket::extract ( P6UINT8 pBuffer,
P6UINT32  cBuffer,
const P6UINT32  nOffset 
)
pure virtual

Gets the specified number of bytes from the packet and stores them in the provided buffer.

This method treats the data as a byte stream and will not perform marshalling of the data. If the offset specified is the P6PKTCUROFFSET constant, then the packet's internal position will be advanced by the number of bytes extracted.

Parameters
pBufferA pointer to the buffer in which to place the extracted bytes.
cBufferThe size of pBuffer in bytes.
nOffsetThe offset from 0 in the packet at which to begin extracting bytes. The internal position will not be updated. If P6PKTCUROFFSET is specified, the packets internal "current" position is used and updated by the number of bytes extracted.
Returns
SuccessP6R::eOkThe data was written or appended successfully.
FailureP6R::eSeekThe specified nOffset was past the end of the buffer.
P6R::eTooBigReading the value from the specified offset would result in reading past the end of the buffer.
P6R::eInvalidArgpVal was NULL.